summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcertus certus@31f1291d-b8d6-0310-a050-a5561fc1590b <certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2006-07-20 18:40:09 +0000
committercertus certus@31f1291d-b8d6-0310-a050-a5561fc1590b <certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2006-07-20 18:40:09 +0000
commit9ffc5d357985703be6e513140cf7ac2ce5c44d7b (patch)
treeac27c99cfffbfde17fd2be1a0ce77de379536b20 /src
parentd1f69f78ac18eb02d4d7a77a9501183ef3ca010c (diff)
# 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
Diffstat (limited to 'src')
-rw-r--r--src/tools/db-merger.c5
-rw-r--r--src/tools/epona2anope.c5
2 files changed, 10 insertions, 0 deletions
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);