From af37ecca3430c871ec8a03bcada90303e6bf9877 Mon Sep 17 00:00:00 2001 From: Alexander Tkachev Date: Mon, 30 May 2016 21:21:31 +0600 Subject: CLOUD: Make SavesSyncRequest work It now actually read the "timestamps" file, loads and saves files as it should, ignores Dropbox's "not_found" error. --- backends/cloud/dropbox/dropboxstorage.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'backends/cloud/dropbox') diff --git a/backends/cloud/dropbox/dropboxstorage.cpp b/backends/cloud/dropbox/dropboxstorage.cpp index 4a17afe6c6..b33e2b6776 100644 --- a/backends/cloud/dropbox/dropboxstorage.cpp +++ b/backends/cloud/dropbox/dropboxstorage.cpp @@ -33,6 +33,9 @@ #include "common/file.h" #include "common/json.h" #include +#include "common/system.h" +#include "common/savefile.h" +#include "../savessyncrequest.h" namespace Cloud { namespace Dropbox { @@ -188,7 +191,18 @@ Networking::Request *DropboxStorage::syncSaves(BoolCallback callback) { false ); */ - return upload("/remote/test4.bmp", "final.bmp", new Common::Callback(this, &DropboxStorage::printUploadStatus)); + /* + debug("%s", ConfMan.get("savepath").c_str()); + Common::StringArray arr = g_system->getSavefileManager()->listSavefiles("*"); + for (uint32 i = 0; i < arr.size(); ++i) { + debug("%s", arr[i].c_str()); + } + debug("EOL"); + */ + //return upload("/remote/backslash", "C:\\Users\\Tkachov\\AppData\\Roaming\\ScummVM\\Saved games\\sword25.000", new Common::Callback(this, &DropboxStorage::printUploadStatus)); + //return upload("/remote/slash", "C:/Users/Tkachov/AppData/Roaming/ScummVM/Saved games/sword25.000", new Common::Callback(this, &DropboxStorage::printUploadStatus)); + return ConnMan.addRequest(new SavesSyncRequest(this, new Common::Callback(this, &DropboxStorage::printBool))); + //return upload("/remote/test4.bmp", "final.bmp", new Common::Callback(this, &DropboxStorage::printUploadStatus)); } Networking::Request *DropboxStorage::info(StorageInfoCallback outerCallback) { -- cgit v1.2.3