aboutsummaryrefslogtreecommitdiff
path: root/backends/cloud/dropbox/dropboxlistdirectoryrequest.cpp
diff options
context:
space:
mode:
authorAlexander Tkachev2016-07-21 11:44:36 +0600
committerAlexander Tkachev2016-08-24 16:07:55 +0600
commit438ba985a4a97a8695a6e6fdda6930694976c07b (patch)
tree066e589b809278ff2e06df31069f8ea3fb6989d7 /backends/cloud/dropbox/dropboxlistdirectoryrequest.cpp
parent01161ae7ddbc5f147dd9e71991eb2f1a1c9a7b06 (diff)
downloadscummvm-rg350-438ba985a4a97a8695a6e6fdda6930694976c07b.tar.gz
scummvm-rg350-438ba985a4a97a8695a6e6fdda6930694976c07b.tar.bz2
scummvm-rg350-438ba985a4a97a8695a6e6fdda6930694976c07b.zip
JANITORIAL: Remove spaces at the end of the line
I knew there were some, but I wanted to fix them once, instead of doing it all the time.
Diffstat (limited to 'backends/cloud/dropbox/dropboxlistdirectoryrequest.cpp')
-rw-r--r--backends/cloud/dropbox/dropboxlistdirectoryrequest.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/backends/cloud/dropbox/dropboxlistdirectoryrequest.cpp b/backends/cloud/dropbox/dropboxlistdirectoryrequest.cpp
index dcbca3131e..cc82f123b1 100644
--- a/backends/cloud/dropbox/dropboxlistdirectoryrequest.cpp
+++ b/backends/cloud/dropbox/dropboxlistdirectoryrequest.cpp
@@ -81,7 +81,7 @@ void DropboxListDirectoryRequest::responseCallback(Networking::JsonResponse resp
Common::JSONValue *json = response.value;
if (json) {
Common::JSONObject responseObjecct = json->asObject();
-
+
if (responseObjecct.contains("error") || responseObjecct.contains("error_summary")) {
warning("Dropbox returned error: %s", responseObjecct.getVal("error_summary")->asString().c_str());
error.failed = true;
@@ -91,7 +91,7 @@ void DropboxListDirectoryRequest::responseCallback(Networking::JsonResponse resp
return;
}
- //TODO: check that ALL keys exist AND HAVE RIGHT TYPE to avoid segfaults
+ //TODO: check that ALL keys exist AND HAVE RIGHT TYPE to avoid segfaults
if (responseObjecct.contains("entries")) {
Common::JSONArray items = responseObjecct.getVal("entries")->asArray();
@@ -110,7 +110,7 @@ void DropboxListDirectoryRequest::responseCallback(Networking::JsonResponse resp
bool hasMore = (responseObjecct.contains("has_more") && responseObjecct.getVal("has_more")->asBool());
- if (hasMore) {
+ if (hasMore) {
Networking::JsonCallback callback = new Common::Callback<DropboxListDirectoryRequest, Networking::JsonResponse>(this, &DropboxListDirectoryRequest::responseCallback);
Networking::ErrorCallback failureCallback = new Common::Callback<DropboxListDirectoryRequest, Networking::ErrorResponse>(this, &DropboxListDirectoryRequest::errorCallback);
Networking::CurlJsonRequest *request = new Networking::CurlJsonRequest(callback, failureCallback, "https://api.dropboxapi.com/2/files/list_folder/continue");
@@ -124,9 +124,9 @@ void DropboxListDirectoryRequest::responseCallback(Networking::JsonResponse resp
request->addPostField(Common::JSON::stringify(&value));
_workingRequest = ConnMan.addRequest(request);
- } else {
+ } else {
finishListing(_files);
- }
+ }
} else {
warning("null, not json");
error.failed = true;
@@ -149,7 +149,7 @@ void DropboxListDirectoryRequest::restart() { start(); }
Common::String DropboxListDirectoryRequest::date() const { return _date; }
-void DropboxListDirectoryRequest::finishListing(Common::Array<StorageFile> &files) {
+void DropboxListDirectoryRequest::finishListing(Common::Array<StorageFile> &files) {
Request::finishSuccess();
if (_listDirectoryCallback) (*_listDirectoryCallback)(Storage::ListDirectoryResponse(this, files));
}