From 9ffc5d357985703be6e513140cf7ac2ce5c44d7b Mon Sep 17 00:00:00 2001 From: "certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b" Date: Thu, 20 Jul 2006 18:40:09 +0000 Subject: [PATCH] # BUILD : 1.7.14 (1097) # BUGS : # NOTES : another fix for db-merger and epona2anope git-svn-id: svn://svn.anope.org/anope/trunk@1097 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@821 5417fbe8-f217-4b02-8779-1006273d7864 --- Changes | 1 + src/tools/db-merger.c | 5 +++++ src/tools/epona2anope.c | 5 +++++ version.log | 6 +++++- 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index 786a794a6..abe781048 100644 --- a/Changes +++ b/Changes @@ -47,6 +47,7 @@ Provided by Anope Dev. - 2006 07/14 F Removed old HAS_RTLD_LOCAL check. [#541] 07/20 F Removed bold chars from botserv langauge files. [#530] 07/20 F Fixed win32 versions of db-merger.c and epona2anope.c. [#536] +07/20 F db-merger.c and epona2anope.c will now properly delete old dbs. [ #00] Provided by ThaPrince - 2006 05/19 A Plexus 3 support. [ #00] diff --git a/src/tools/db-merger.c b/src/tools/db-merger.c index aed7adc08..3ce9ede03 100644 --- a/src/tools/db-merger.c +++ b/src/tools/db-merger.c @@ -1674,6 +1674,11 @@ dbFILE *open_db_write(const char *service, const char *filename, uint32 version) } strscpy(f->filename, filename, sizeof(f->filename)); filename = f->filename; +#ifndef _WIN32 + unlink(filename); +#else + DeleteFile(filename); +#endif f->mode = 'w'; #ifndef _WIN32 fd = open(filename, O_WRONLY | O_CREAT | O_EXCL, 0666); diff --git a/src/tools/epona2anope.c b/src/tools/epona2anope.c index 193cfdb11..a87bd0ae0 100644 --- a/src/tools/epona2anope.c +++ b/src/tools/epona2anope.c @@ -597,6 +597,11 @@ dbFILE *open_db_write(const char *service, const char *filename, int version) } strscpy(f->filename, filename, sizeof(f->filename)); filename = f->filename; +#ifndef _WIN32 + unlink(filename); +#else + DeleteFile(filename); +#endif f->mode = 'w'; #ifndef _WIN32 fd = open(filename, O_WRONLY | O_CREAT | O_EXCL, 0666); diff --git a/version.log b/version.log index 341b019df..68e3d9803 100644 --- a/version.log +++ b/version.log @@ -9,10 +9,14 @@ VERSION_MAJOR="1" VERSION_MINOR="7" VERSION_PATCH="14" VERSION_EXTRA="" -VERSION_BUILD="1096" +VERSION_BUILD="1097" # $Log$ # +# BUILD : 1.7.14 (1097) +# BUGS : +# NOTES : another fix for db-merger and epona2anope +# # BUILD : 1.7.14 (1096) # BUGS : 536 # NOTES : Fixed win32 versions of db-merger.c and epona2anope.c