diff options
Diffstat (limited to 'backends/cloud/googledrive/googledrivelistdirectoryrequest.cpp')
-rw-r--r-- | backends/cloud/googledrive/googledrivelistdirectoryrequest.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/backends/cloud/googledrive/googledrivelistdirectoryrequest.cpp b/backends/cloud/googledrive/googledrivelistdirectoryrequest.cpp index 8811ffc938..3387b43418 100644 --- a/backends/cloud/googledrive/googledrivelistdirectoryrequest.cpp +++ b/backends/cloud/googledrive/googledrivelistdirectoryrequest.cpp @@ -58,6 +58,7 @@ void GoogleDriveListDirectoryRequest::start() { void GoogleDriveListDirectoryRequest::idResolvedCallback(Storage::UploadResponse response) { _workingRequest = nullptr; if (_ignoreCallback) return; + if (response.request) _date = response.request->date(); StorageFile directory = response.value; directory.setPath(_requestedPath); @@ -68,6 +69,7 @@ void GoogleDriveListDirectoryRequest::idResolvedCallback(Storage::UploadResponse void GoogleDriveListDirectoryRequest::idResolveErrorCallback(Networking::ErrorResponse error) { _workingRequest = nullptr; if (_ignoreCallback) return; + if (error.request) _date = error.request->date(); finishError(error); } @@ -88,6 +90,7 @@ void GoogleDriveListDirectoryRequest::listNextDirectory() { void GoogleDriveListDirectoryRequest::listedDirectoryCallback(Storage::FileArrayResponse response) { _workingRequest = nullptr; if (_ignoreCallback) return; + if (response.request) _date = response.request->date(); for (uint32 i = 0; i < response.value.size(); ++i) { StorageFile &file = response.value[i]; @@ -107,6 +110,7 @@ void GoogleDriveListDirectoryRequest::listedDirectoryCallback(Storage::FileArray void GoogleDriveListDirectoryRequest::listedDirectoryErrorCallback(Networking::ErrorResponse error) { _workingRequest = nullptr; if (_ignoreCallback) return; + if (error.request) _date = error.request->date(); finishError(error); } @@ -114,6 +118,8 @@ void GoogleDriveListDirectoryRequest::handle() {} void GoogleDriveListDirectoryRequest::restart() { start(); } +Common::String GoogleDriveListDirectoryRequest::date() const { return _date; } + void GoogleDriveListDirectoryRequest::finishSuccess(Common::Array<StorageFile> &files) { Request::finishSuccess(); if (_listDirectoryCallback) (*_listDirectoryCallback)(Storage::ListDirectoryResponse(this, files)); |