1
0
mirror of https://github.com/anope/anope.git synced 2026-06-12 19:14:47 +02:00

Fixed db_plain to write databases on windows

This commit is contained in:
Adam
2010-06-21 02:02:51 -04:00
parent f63aed908f
commit 7956bd839c
+3 -1
View File
@@ -44,6 +44,7 @@ static void ReadDatabase(Module *m = NULL)
EventReturn MOD_RESULT;
MDType Type = MD_NONE;
db.clear();
db.open(DatabaseFile.c_str(), std::ios_base::in);
if (!db.is_open())
@@ -584,7 +585,7 @@ class DBPlain : public Module
{
ircdproto->SendGlobops(findbot(Config.s_OperServ), "Unable to backup database!");
Alog() << "Unable to back up database!";
if (!Config.NoBackupOkay)
quitting = 1;
@@ -928,6 +929,7 @@ class DBPlain : public Module
{
BackupDatabase();
db.clear();
db.open(DatabaseFile.c_str(), std::ios_base::out | std::ios_base::trunc);
if (!db.is_open())