aboutsummaryrefslogtreecommitdiff
path: root/backends/cloud/savessyncrequest.cpp
diff options
context:
space:
mode:
authorAlexander Tkachev2019-07-24 19:12:14 +0700
committerMatan Bareket2019-07-30 14:51:41 -0400
commite7ca2b8db02aee7f4893964f13f2f708d0a3b695 (patch)
treebbc6328e0500790f0fc175af723e4b6a86ac1626 /backends/cloud/savessyncrequest.cpp
parent7fc6477ce2d1001ab5111a16d2a6b408951a0b59 (diff)
downloadscummvm-rg350-e7ca2b8db02aee7f4893964f13f2f708d0a3b695.tar.gz
scummvm-rg350-e7ca2b8db02aee7f4893964f13f2f708d0a3b695.tar.bz2
scummvm-rg350-e7ca2b8db02aee7f4893964f13f2f708d0a3b695.zip
CLOUD: Ignore hidden files in sync/download
In PR#1754 we've discussed and decided to ignore hidden (having a name starting with '.') files while syncing saves or downloading game files. This commit adds a CloudManager method to test whether file should be ignored, and this method could be extended later if we need to ignore some other specific file names.
Diffstat (limited to 'backends/cloud/savessyncrequest.cpp')
-rw-r--r--backends/cloud/savessyncrequest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/backends/cloud/savessyncrequest.cpp b/backends/cloud/savessyncrequest.cpp
index ab455c63a2..3a581005c6 100644
--- a/backends/cloud/savessyncrequest.cpp
+++ b/backends/cloud/savessyncrequest.cpp
@@ -96,7 +96,7 @@ void SavesSyncRequest::directoryListedCallback(Storage::ListDirectoryResponse re
if (file.isDirectory())
continue;
totalSize += file.size();
- if (file.name() == DefaultSaveFileManager::TIMESTAMPS_FILENAME)
+ if (file.name() == DefaultSaveFileManager::TIMESTAMPS_FILENAME || !CloudMan.canSyncFilename(file.name()))
continue;
Common::String name = file.name();
@@ -129,7 +129,7 @@ void SavesSyncRequest::directoryListedCallback(Storage::ListDirectoryResponse re
//upload files which are unavailable in cloud
for (Common::HashMap<Common::String, bool>::iterator i = localFileNotAvailableInCloud.begin(); i != localFileNotAvailableInCloud.end(); ++i) {
- if (i->_key == DefaultSaveFileManager::TIMESTAMPS_FILENAME)
+ if (i->_key == DefaultSaveFileManager::TIMESTAMPS_FILENAME || !CloudMan.canSyncFilename(i->_key))
continue;
if (i->_value) {
_filesToUpload.push_back(i->_key);