diff options
Diffstat (limited to 'backends/saves')
-rw-r--r-- | backends/saves/default/default-saves.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/backends/saves/default/default-saves.cpp b/backends/saves/default/default-saves.cpp index 8a7fba46f7..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); @@ -330,7 +340,8 @@ Common::HashMap<Common::String, uint32> DefaultSaveFileManager::loadTimestamps() //parse timestamp uint32 timestamp = buffer.asUint64(); if (buffer == "" || timestamp == 0) break; - timestamps[filename] = timestamp; + if (timestamps.contains(filename)) + timestamps[filename] = timestamp; } delete file; |