diff options
author | Alexander Tkachev | 2016-06-06 13:37:51 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | b614869de80759991c50827f0f1f35c13ef87f0d (patch) | |
tree | bb28c11fe8c83e3ae2d1007ee46cd00cfd9f177f | |
parent | 67789c3c1621e4b59167bd9f0c0d38eec122dd90 (diff) | |
download | scummvm-rg350-b614869de80759991c50827f0f1f35c13ef87f0d.tar.gz scummvm-rg350-b614869de80759991c50827f0f1f35c13ef87f0d.tar.bz2 scummvm-rg350-b614869de80759991c50827f0f1f35c13ef87f0d.zip |
CLOUD: Minor fixes
-rw-r--r-- | backends/cloud/dropbox/dropboxuploadrequest.cpp | 5 | ||||
-rw-r--r-- | backends/cloud/savessyncrequest.cpp | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/backends/cloud/dropbox/dropboxuploadrequest.cpp b/backends/cloud/dropbox/dropboxuploadrequest.cpp index bf8e43d7cb..5765892a70 100644 --- a/backends/cloud/dropbox/dropboxuploadrequest.cpp +++ b/backends/cloud/dropbox/dropboxuploadrequest.cpp @@ -48,6 +48,11 @@ DropboxUploadRequest::~DropboxUploadRequest() { void DropboxUploadRequest::start() { _ignoreCallback = true; if (_workingRequest) _workingRequest->finish(); + if (!_contentsStream) { + warning("DropboxUploadRequest: cannot start because stream is invalid"); + finishError(Networking::ErrorResponse(this, false, true, "", -1)); + return; + } if (!_contentsStream->seek(0)) { warning("DropboxUploadRequest: cannot restart because stream couldn't seek(0)"); finishError(Networking::ErrorResponse(this, false, true, "", -1)); diff --git a/backends/cloud/savessyncrequest.cpp b/backends/cloud/savessyncrequest.cpp index f07d1d000f..3c41c005e4 100644 --- a/backends/cloud/savessyncrequest.cpp +++ b/backends/cloud/savessyncrequest.cpp @@ -342,7 +342,11 @@ void SavesSyncRequest::finishSuccess(bool success) { } void SavesSyncRequest::loadTimestamps() { - //start with listing all the files in saves/ directory and setting invalid timestamp to them + //refresh the files list + Common::Array<Common::String> files; + g_system->getSavefileManager()->updateSavefilesList(files); + + //start with listing all the files in saves/ directory and setting invalid timestamp to them Common::StringArray localFiles = g_system->getSavefileManager()->listSavefiles("*"); for (uint32 i = 0; i < localFiles.size(); ++i) _localFilesTimestamps[localFiles[i]] = INVALID_TIMESTAMP; |