From 626afff37d1a31b2427700ac5a1dbdb32171afbc Mon Sep 17 00:00:00 2001 From: Adam- Date: Sun, 11 Apr 2010 00:28:59 +0000 Subject: [PATCH] Dont backup the database unless there is a database to backup git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2884 5417fbe8-f217-4b02-8779-1006273d7864 --- src/core/db_plain.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/db_plain.cpp b/src/core/db_plain.cpp index d461fd282..0499b4fd4 100644 --- a/src/core/db_plain.cpp +++ b/src/core/db_plain.cpp @@ -887,8 +887,6 @@ class DBPlain : public Module EventReturn OnSaveDatabase() { - BackupDatabase(); - db.open(DatabaseFile.c_str(), std::ios_base::out | std::ios_base::trunc); if (!db.is_open()) @@ -1174,6 +1172,8 @@ class DBPlain : public Module db.close(); + BackupDatabase(); + return EVENT_CONTINUE; }