aboutsummaryrefslogtreecommitdiff
path: root/backends/cloud/folderdownloadrequest.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/folderdownloadrequest.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/folderdownloadrequest.cpp')
-rw-r--r--backends/cloud/folderdownloadrequest.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/backends/cloud/folderdownloadrequest.cpp b/backends/cloud/folderdownloadrequest.cpp
index 3d31beba4b..c3b9eece87 100644
--- a/backends/cloud/folderdownloadrequest.cpp
+++ b/backends/cloud/folderdownloadrequest.cpp
@@ -26,6 +26,7 @@
#include "common/debug.h"
#include "gui/downloaddialog.h"
#include <backends/networking/curl/connectionmanager.h>
+#include "cloudmanager.h"
namespace Cloud {
@@ -73,8 +74,9 @@ void FolderDownloadRequest::directoryListedCallback(Storage::ListDirectoryRespon
// remove all directories
// non-empty directories would be created by DumpFile, and empty ones are just ignored
+ // also skip all hidden files (with names starting with '.') or with other names that are forbidden to sync in CloudManager
for (Common::Array<StorageFile>::iterator i = _pendingFiles.begin(); i != _pendingFiles.end();)
- if (i->isDirectory())
+ if (i->isDirectory() || !CloudMan.canSyncFilename(i->name()))
_pendingFiles.erase(i);
else {
_totalBytes += i->size();