1
0
mirror of https://github.com/anope/anope.git synced 2026-06-28 16:56:39 +02:00

Log more when unable to backup databases in db_flatfile

This commit is contained in:
Adam
2014-06-15 04:49:31 -04:00
parent 8066378471
commit 4f7868b125
+5 -1
View File
@@ -146,10 +146,14 @@ class DBFlatFile : public Module, public Pipe
Log(LOG_DEBUG) << "db_flatfile: Attempting to rename " << *it << " to " << newname;
if (rename(oldname.c_str(), newname.c_str()))
{
Log(this) << "Unable to back up database " << *it << "!";
Anope::string err = Anope::LastError();
Log(this) << "Unable to back up database " << *it << " (" << err << ")!";
if (!Config->GetModule(this)->Get<bool>("nobackupok"))
{
Anope::Quitting = true;
Anope::QuitReason = "Unable to back up database " + *it + " (" + err + ")";
}
continue;
}