From 50c489bc7a36972186cdb843c0582195f37e4549 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 10 Mar 2017 01:09:17 +0300 Subject: Dont try backup not existing config.xml --- src/configmanager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/configmanager.cpp') diff --git a/src/configmanager.cpp b/src/configmanager.cpp index a25c26802..219f19905 100644 --- a/src/configmanager.cpp +++ b/src/configmanager.cpp @@ -175,6 +175,12 @@ void ConfigManager::backupConfig(const std::string &name) const std::string fileName3 = std::string(settings.configDir).append( "/").append(name); StringVect arr; + if (Files::existsLocal(fileName3) == false) + { + logger->log("Config %s not exists, backup skipped.", + name.c_str()); + return; + } if (Files::loadTextFileLocal(fileName3, arr) == true) { if (arr.size() == 0) -- cgit v1.2.3-70-g09d2