From ab258156942cd0ca95e77bad72e6f40ae8849f39 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 5 Mar 2012 20:15:56 -0500 Subject: Fixed backup databases having their names collide due to not separating month and day, #1383 --- modules/database/db_flatfile.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'modules/database/db_flatfile.cpp') diff --git a/modules/database/db_flatfile.cpp b/modules/database/db_flatfile.cpp index 5442e096f..259851b18 100644 --- a/modules/database/db_flatfile.cpp +++ b/modules/database/db_flatfile.cpp @@ -13,10 +13,9 @@ #include "module.h" #include -Anope::string DatabaseFile; - class DBFlatFile : public Module { + Anope::string DatabaseFile; /* Day the last backup was on */ int LastDay; /* Backup file names */ @@ -47,7 +46,7 @@ class DBFlatFile : public Module if (tm->tm_mday != LastDay) { LastDay = tm->tm_mday; - Anope::string newname = "backups/" + DatabaseFile + "." + stringify(tm->tm_year) + stringify(tm->tm_mon) + stringify(tm->tm_mday); + Anope::string newname = "backups/" + DatabaseFile + "." + stringify(tm->tm_year) + "." + stringify(tm->tm_mon) + "." + stringify(tm->tm_mday); /* Backup already exists */ if (IsFile(newname)) -- cgit