summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-03-10 01:09:17 +0300
committerAndrei Karas <akaras@inbox.ru>2017-03-10 01:09:17 +0300
commit50c489bc7a36972186cdb843c0582195f37e4549 (patch)
treef878d378add4bf750bebd54d91732c1a85384ba8
parent0e77e523e3b392c10adf4ccb1b5a77c5a44d5a78 (diff)
downloadmv-50c489bc7a36972186cdb843c0582195f37e4549.tar.gz
mv-50c489bc7a36972186cdb843c0582195f37e4549.tar.bz2
mv-50c489bc7a36972186cdb843c0582195f37e4549.tar.xz
mv-50c489bc7a36972186cdb843c0582195f37e4549.zip
Dont try backup not existing config.xml
-rw-r--r--src/configmanager.cpp6
1 files changed, 6 insertions, 0 deletions
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)