aboutsummaryrefslogtreecommitdiff
path: root/backends/cloud/dropbox/dropboxlistdirectoryrequest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/cloud/dropbox/dropboxlistdirectoryrequest.cpp')
-rw-r--r--backends/cloud/dropbox/dropboxlistdirectoryrequest.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/backends/cloud/dropbox/dropboxlistdirectoryrequest.cpp b/backends/cloud/dropbox/dropboxlistdirectoryrequest.cpp
index d782f81a69..933ea2bd8e 100644
--- a/backends/cloud/dropbox/dropboxlistdirectoryrequest.cpp
+++ b/backends/cloud/dropbox/dropboxlistdirectoryrequest.cpp
@@ -71,6 +71,8 @@ void DropboxListDirectoryRequest::responseCallback(Networking::JsonResponse resp
_workingRequest = nullptr;
if (_ignoreCallback) return;
+ if (response.request) _date = response.request->date();
+
Networking::ErrorResponse error(this);
Networking::CurlJsonRequest *rq = (Networking::CurlJsonRequest *)response.request;
if (rq && rq->getNetworkReadStream())
@@ -137,6 +139,7 @@ void DropboxListDirectoryRequest::responseCallback(Networking::JsonResponse resp
void DropboxListDirectoryRequest::errorCallback(Networking::ErrorResponse error) {
_workingRequest = nullptr;
if (_ignoreCallback) return;
+ if (error.request) _date = error.request->date();
finishError(error);
}
@@ -144,6 +147,8 @@ void DropboxListDirectoryRequest::handle() {}
void DropboxListDirectoryRequest::restart() { start(); }
+Common::String DropboxListDirectoryRequest::date() const { return _date; }
+
void DropboxListDirectoryRequest::finishSuccess(Common::Array<StorageFile> &files) {
Request::finishSuccess();
if (_listDirectoryCallback) (*_listDirectoryCallback)(Storage::ListDirectoryResponse(this, files));