aboutsummaryrefslogtreecommitdiff
path: root/backends/saves
diff options
context:
space:
mode:
authorThierry Crozat2016-09-18 05:51:57 +0100
committerThierry Crozat2016-09-18 05:51:57 +0100
commitc42dfbc4968ff2cdc7ad1ed316164d4cab20b550 (patch)
tree08b70c878e67a2b044c157db73b83bea14594007 /backends/saves
parent33d1c558663f0b7ed5eafec999c506a55307ff27 (diff)
downloadscummvm-rg350-c42dfbc4968ff2cdc7ad1ed316164d4cab20b550.tar.gz
scummvm-rg350-c42dfbc4968ff2cdc7ad1ed316164d4cab20b550.tar.bz2
scummvm-rg350-c42dfbc4968ff2cdc7ad1ed316164d4cab20b550.zip
BACKEND: When removing a save files also remove entry from timestamps file
Diffstat (limited to 'backends/saves')
-rw-r--r--backends/saves/default/default-saves.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/backends/saves/default/default-saves.cpp b/backends/saves/default/default-saves.cpp
index 72d65df6e2..a958974209 100644
--- a/backends/saves/default/default-saves.cpp
+++ b/backends/saves/default/default-saves.cpp
@@ -181,6 +181,16 @@ bool DefaultSaveFileManager::removeSavefile(const Common::String &filename) {
assureCached(getSavePath());
if (getError().getCode() != Common::kNoError)
return false;
+
+#ifdef USE_LIBCURL
+ // Update file's timestamp
+ Common::HashMap<Common::String, uint32> timestamps = loadTimestamps();
+ Common::HashMap<Common::String, uint32>::iterator it = timestamps.find(filename);
+ if (it != timestamps.end()) {
+ timestamps.erase(it);
+ saveTimestamps(timestamps);
+ }
+#endif
// Obtain node if exists.
SaveFileCache::const_iterator file = _saveFileCache.find(filename);