aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/cloud/dropbox/dropboxuploadrequest.cpp5
-rw-r--r--backends/cloud/savessyncrequest.cpp6
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;