diff options
Diffstat (limited to 'backends/cloud/googledrive/googledrivestorage.cpp')
-rw-r--r-- | backends/cloud/googledrive/googledrivestorage.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/backends/cloud/googledrive/googledrivestorage.cpp b/backends/cloud/googledrive/googledrivestorage.cpp index 1750dc9646..3c85b1f074 100644 --- a/backends/cloud/googledrive/googledrivestorage.cpp +++ b/backends/cloud/googledrive/googledrivestorage.cpp @@ -34,6 +34,7 @@ #include "googledrivelistdirectorybyidrequest.h" #include "googledriveresolveidrequest.h" #include "googledrivecreatedirectoryrequest.h" +#include "googledrivelistdirectoryrequest.h" namespace Cloud { namespace GoogleDrive { @@ -238,8 +239,9 @@ Networking::Request *GoogleDriveStorage::resolveFileId(Common::String path, Uplo } Networking::Request *GoogleDriveStorage::listDirectory(Common::String path, ListDirectoryCallback callback, Networking::ErrorCallback errorCallback, bool recursive) { - //return addRequest(new GoogleDriveListDirectoryRequest(this, path, callback, errorCallback, recursive)); - return nullptr; + if (!errorCallback) errorCallback = getErrorPrintingCallback(); + if (!callback) callback = new Common::Callback<GoogleDriveStorage, FileArrayResponse>(this, &GoogleDriveStorage::printFiles); + return addRequest(new GoogleDriveListDirectoryRequest(this, path, callback, errorCallback, recursive)); } Networking::Request *GoogleDriveStorage::listDirectoryById(Common::String id, ListDirectoryCallback callback, Networking::ErrorCallback errorCallback) { |