diff options
author | Alexander Tkachev | 2016-05-31 16:23:25 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | 3638c8348d98273da5c4e2c5bd1afa8a985a2d0c (patch) | |
tree | 0f3e1a20e5a25c051e901f318f42cb2c1251789f /backends/cloud/savessyncrequest.cpp | |
parent | b39f46788a70a6c72d5ca678c79c0b53ebde9b68 (diff) | |
download | scummvm-rg350-3638c8348d98273da5c4e2c5bd1afa8a985a2d0c.tar.gz scummvm-rg350-3638c8348d98273da5c4e2c5bd1afa8a985a2d0c.tar.bz2 scummvm-rg350-3638c8348d98273da5c4e2c5bd1afa8a985a2d0c.zip |
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.
Diffstat (limited to 'backends/cloud/savessyncrequest.cpp')
-rw-r--r-- | backends/cloud/savessyncrequest.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/backends/cloud/savessyncrequest.cpp b/backends/cloud/savessyncrequest.cpp index b48a99a48c..9727738654 100644 --- a/backends/cloud/savessyncrequest.cpp +++ b/backends/cloud/savessyncrequest.cpp @@ -60,7 +60,7 @@ void SavesSyncRequest::start() { //list saves directory _workingRequest = _storage->listDirectory( - "/saves", + _storage->savesDirectoryPath(), new Common::Callback<SavesSyncRequest, Storage::ListDirectoryResponse>(this, &SavesSyncRequest::directoryListedCallback), new Common::Callback<SavesSyncRequest, Networking::ErrorResponse>(this, &SavesSyncRequest::directoryListedErrorCallback) ); @@ -165,6 +165,7 @@ void SavesSyncRequest::directoryListedErrorCallback(Networking::ErrorResponse er //we're lucky - user just lacks his "/cloud/" folder Common::Array<StorageFile> files; directoryListedCallback(Storage::ListDirectoryResponse(error.request, files)); + //TODO: create it before uploading stuff } void SavesSyncRequest::downloadNextFile() { @@ -222,7 +223,7 @@ void SavesSyncRequest::uploadNextFile() { /////// debug("uploading %s", _currentUploadingFile.c_str()); /////// - _workingRequest = _storage->upload("/saves/" + _currentUploadingFile, g_system->getSavefileManager()->openRawFile(_currentUploadingFile), + _workingRequest = _storage->upload(_storage->savesDirectoryPath() + _currentUploadingFile, g_system->getSavefileManager()->openRawFile(_currentUploadingFile), new Common::Callback<SavesSyncRequest, Storage::UploadResponse>(this, &SavesSyncRequest::fileUploadedCallback), new Common::Callback<SavesSyncRequest, Networking::ErrorResponse>(this, &SavesSyncRequest::fileUploadedErrorCallback) ); |