summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/db_plain.cpp4
1 files 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;
}