diff options
author | Alexander Tkachev | 2019-07-24 19:12:14 +0700 |
---|---|---|
committer | Matan Bareket | 2019-07-30 14:51:41 -0400 |
commit | e7ca2b8db02aee7f4893964f13f2f708d0a3b695 (patch) | |
tree | bbc6328e0500790f0fc175af723e4b6a86ac1626 /backends/cloud/cloudmanager.cpp | |
parent | 7fc6477ce2d1001ab5111a16d2a6b408951a0b59 (diff) | |
download | scummvm-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/cloudmanager.cpp')
-rw-r--r-- | backends/cloud/cloudmanager.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/backends/cloud/cloudmanager.cpp b/backends/cloud/cloudmanager.cpp index 432a63b040..a3e9856455 100644 --- a/backends/cloud/cloudmanager.cpp +++ b/backends/cloud/cloudmanager.cpp @@ -358,6 +358,13 @@ Common::String CloudManager::savesDirectoryPath() { return ""; } +bool CloudManager::canSyncFilename(const Common::String &filename) const { + if (filename == "" || filename[0] == '.') + return false; + + return true; +} + SavesSyncRequest *CloudManager::syncSaves(Storage::BoolCallback callback, Networking::ErrorCallback errorCallback) { Storage *storage = getCurrentStorage(); if (storage) { |