From 4f7868b1250fa02be825a193970bfb08e32e5d96 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 15 Jun 2014 04:49:31 -0400 Subject: [PATCH] Log more when unable to backup databases in db_flatfile --- modules/database/db_flatfile.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/database/db_flatfile.cpp b/modules/database/db_flatfile.cpp index aa8f427ad..97c88a986 100644 --- a/modules/database/db_flatfile.cpp +++ b/modules/database/db_flatfile.cpp @@ -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("nobackupok")) + { Anope::Quitting = true; + Anope::QuitReason = "Unable to back up database " + *it + " (" + err + ")"; + } continue; }