diff options
author | Alexander Tkachev | 2016-07-19 15:47:46 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | d0c54cdd64a174f648321608d29f3c0860837256 (patch) | |
tree | f63c69502d61c2e557b5d2f8b9fe5de7be48761a /backends/cloud | |
parent | 55568d757ce2990a285a6193a60242f9932d0797 (diff) | |
download | scummvm-rg350-d0c54cdd64a174f648321608d29f3c0860837256.tar.gz scummvm-rg350-d0c54cdd64a174f648321608d29f3c0860837256.tar.bz2 scummvm-rg350-d0c54cdd64a174f648321608d29f3c0860837256.zip |
CLOUD: Fix DropboxCreateDirectoryRequest
It now calls success callback with `false` on Dropbox's
"path/conflict/folder", indicating that the directory already exists.
Diffstat (limited to 'backends/cloud')
-rw-r--r-- | backends/cloud/dropbox/dropboxcreatedirectoryrequest.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/backends/cloud/dropbox/dropboxcreatedirectoryrequest.cpp b/backends/cloud/dropbox/dropboxcreatedirectoryrequest.cpp index a52d41e896..81ace75dda 100644 --- a/backends/cloud/dropbox/dropboxcreatedirectoryrequest.cpp +++ b/backends/cloud/dropbox/dropboxcreatedirectoryrequest.cpp @@ -84,6 +84,14 @@ void DropboxCreateDirectoryRequest::responseCallback(Networking::JsonResponse re Common::JSONObject info = json->asObject(); if (info.contains("id")) finishCreation(true); else { + if (info.contains("error_summary") && info.getVal("error_summary")->isString()) { + Common::String summary = info.getVal("error_summary")->asString(); + if (summary.contains("path") && summary.contains("conflict") && summary.contains("folder")) { + finishCreation(false); + delete json; + return; + } + } error.response = json->stringify(true); finishError(error); } |