diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-04-03 02:12:42 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-04-03 18:44:58 +0300 |
commit | 9e72886ee15acc39cbb6075ce32a60a5391ea9f3 (patch) | |
tree | fd7d0b05eeaed5ab0016cad58772cab7456f36b4 /src/configmanager.cpp | |
parent | 49631972db5b965413d4bbe36983a8d5bd203183 (diff) | |
download | mv-9e72886ee15acc39cbb6075ce32a60a5391ea9f3.tar.gz mv-9e72886ee15acc39cbb6075ce32a60a5391ea9f3.tar.bz2 mv-9e72886ee15acc39cbb6075ce32a60a5391ea9f3.tar.xz mv-9e72886ee15acc39cbb6075ce32a60a5391ea9f3.zip |
Replace string::append with pathJoin.
Diffstat (limited to 'src/configmanager.cpp')
-rw-r--r-- | src/configmanager.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/configmanager.cpp b/src/configmanager.cpp index f1232235a..eb65d14f3 100644 --- a/src/configmanager.cpp +++ b/src/configmanager.cpp @@ -173,8 +173,7 @@ void ConfigManager::initConfiguration() void ConfigManager::backupConfig(const std::string &name) { - const std::string fileName3 = std::string(settings.configDir).append( - "/").append(name); + const std::string fileName3 = pathJoin(settings.configDir, name); StringVect arr; if (Files::existsLocal(fileName3) == false) { @@ -188,11 +187,8 @@ void ConfigManager::backupConfig(const std::string &name) return; arr.clear(); - const std::string tmpName = std::string( - settings.configDir).append( - "/").append( - name).append( - ".tmp"); + const std::string tmpName = pathJoin(settings.configDir, + name).append(".tmp"); Files::copyFile(fileName3, tmpName); if (Files::loadTextFileLocal(tmpName, arr) == false || arr.size() == 0) @@ -203,11 +199,8 @@ void ConfigManager::backupConfig(const std::string &name) arr.clear(); } - const std::string confName = std::string( - settings.configDir).append( - "/").append( - name).append( - ".bak"); + const std::string confName = pathJoin(settings.configDir, + name).append(".bak"); const int maxFileIndex = 5; ::remove((confName + toString(maxFileIndex)).c_str()); for (int f = maxFileIndex; f > 1; f --) |