1
0
mirror of https://github.com/anope/anope.git synced 2026-06-27 21:06:37 +02:00

Fixed backup databases having their names collide due to not separating month and day, #1383

This commit is contained in:
Adam
2012-03-05 20:15:56 -05:00
parent 8e0104363f
commit ab25815694
+2 -3
View File
@@ -13,10 +13,9 @@
#include "module.h"
#include <unistd.h>
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))