diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-03-10 01:09:17 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-03-10 01:09:17 +0300 |
commit | 50c489bc7a36972186cdb843c0582195f37e4549 (patch) | |
tree | f878d378add4bf750bebd54d91732c1a85384ba8 /src/configmanager.cpp | |
parent | 0e77e523e3b392c10adf4ccb1b5a77c5a44d5a78 (diff) | |
download | plus-50c489bc7a36972186cdb843c0582195f37e4549.tar.gz plus-50c489bc7a36972186cdb843c0582195f37e4549.tar.bz2 plus-50c489bc7a36972186cdb843c0582195f37e4549.tar.xz plus-50c489bc7a36972186cdb843c0582195f37e4549.zip |
Dont try backup not existing config.xml
Diffstat (limited to 'src/configmanager.cpp')
-rw-r--r-- | src/configmanager.cpp | 6 |
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) |