From acce1c89ab2b9b362fa9f2fc32ae813c62038705 Mon Sep 17 00:00:00 2001 From: Alexander Tkachev Date: Sun, 3 Jul 2016 12:11:45 +0600 Subject: CLOUD: Fix saves sync Tested that on actual unix system and found out a few minor bugs related to paths. --- backends/saves/default/default-saves.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'backends/saves') 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(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 -- cgit v1.2.3