diff options
author | Alexander Tkachev | 2016-07-03 12:11:45 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | acce1c89ab2b9b362fa9f2fc32ae813c62038705 (patch) | |
tree | a04224f9cbb08d8fdb5458e07a586dd56a5f5cd9 /backends | |
parent | f3a392359be2f6d05bac107a5f7bd168c178e428 (diff) | |
download | scummvm-rg350-acce1c89ab2b9b362fa9f2fc32ae813c62038705.tar.gz scummvm-rg350-acce1c89ab2b9b362fa9f2fc32ae813c62038705.tar.bz2 scummvm-rg350-acce1c89ab2b9b362fa9f2fc32ae813c62038705.zip |
CLOUD: Fix saves sync
Tested that on actual unix system and found out a few minor bugs related
to paths.
Diffstat (limited to 'backends')
-rw-r--r-- | backends/saves/default/default-saves.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/backends/saves/default/default-saves.cpp b/backends/saves/default/default-saves.cpp index 54dc1c2966..06d4047a4e 100644 --- a/backends/saves/default/default-saves.cpp +++ b/backends/saves/default/default-saves.cpp @@ -359,7 +359,8 @@ void DefaultSaveFileManager::saveTimestamps(Common::HashMap<Common::String, uint } Common::String DefaultSaveFileManager::concatWithSavesPath(Common::String name) { - Common::String path = ConfMan.get("savepath"); + DefaultSaveFileManager *manager = dynamic_cast<DefaultSaveFileManager *>(g_system->getSavefileManager()); + Common::String path = (manager ? manager->getSavePath() : ConfMan.get("savepath")); if (path.size() > 0 && (path.lastChar() == '/' || path.lastChar() == '\\')) return path + name; @@ -369,8 +370,8 @@ Common::String DefaultSaveFileManager::concatWithSavesPath(Common::String name) if (path[i] == '/') --backslashes; else if (path[i] == '\\') ++backslashes; - if (backslashes) return path + '\\' + name; - return path + '/' + name; + if (backslashes > 0) return path + '\\' + name; + return path + '/' + name; } #endif // ifdef USE_CLOUD |