CLOUD: Minor fixes

This commit is contained in:
Alexander Tkachev 2016-06-06 13:37:51 +06:00
parent 67789c3c16
commit b614869de8
2 changed files with 10 additions and 1 deletions

View File

@ -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));

View File

@ -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;