From 3638c8348d98273da5c4e2c5bd1afa8a985a2d0c Mon Sep 17 00:00:00 2001 From: Alexander Tkachev Date: Tue, 31 May 2016 16:23:25 +0600 Subject: CLOUD: Make SavesSyncRequest work with OneDrive It actually works fine, but small Storage::savesDirectoryPath() was added, because Dropbox's directories must start with a slash, and OneDrive's directories must not. Saves sync tested and it works fine with OneDrive. --- backends/cloud/dropbox/dropboxstorage.cpp | 2 ++ backends/cloud/dropbox/dropboxstorage.h | 3 +++ 2 files changed, 5 insertions(+) (limited to 'backends/cloud/dropbox') diff --git a/backends/cloud/dropbox/dropboxstorage.cpp b/backends/cloud/dropbox/dropboxstorage.cpp index 7ba072d578..beb510882a 100644 --- a/backends/cloud/dropbox/dropboxstorage.cpp +++ b/backends/cloud/dropbox/dropboxstorage.cpp @@ -178,6 +178,8 @@ Networking::Request *DropboxStorage::info(StorageInfoCallback outerCallback, Net //and then calls the outerCallback (which wants to receive StorageInfo, not void *) } +Common::String DropboxStorage::savesDirectoryPath() { return "/saves/"; } + void DropboxStorage::infoInnerCallback(StorageInfoCallback outerCallback, Networking::JsonResponse response) { Common::JSONValue *json = response.value; if (!json) { diff --git a/backends/cloud/dropbox/dropboxstorage.h b/backends/cloud/dropbox/dropboxstorage.h index a5ef76a3d6..90a1d270e8 100644 --- a/backends/cloud/dropbox/dropboxstorage.h +++ b/backends/cloud/dropbox/dropboxstorage.h @@ -103,6 +103,9 @@ public: /** This method is passed into info(). (Temporary) */ void infoMethodCallback(StorageInfoResponse response); + /** Returns storage's saves directory path with the trailing slash. */ + virtual Common::String savesDirectoryPath(); + /** Returns whether saves sync process is running. */ virtual bool isSyncing() { return false; } //TODO -- cgit v1.2.3