We Want to Hear From You! What Do You Want to See on the Community? Tell us here!
Forum Discussion
Aibek D.
10 years agoNew member | Level 1
[SwiftyDropbox] client.files.listFolder(recursive: true) doesn't list shared folders
Hi guys,
a trouble we have here is fairly simple to reproduce.
We're using Client.files.listFolder(recursive: true) for scanning a particular directory and its subdirectories to quickly find files with necessary extensions. It was working good and great until we noticed that it doesn't exactly work with shared folders.
listFolder(recursive: false) works just great and allows us browse, view contents and download necessary files from shared folders. But, when using listFolder(recursive: true) API simply doesn't return any files for shared folders.
For example, calling listFolder(recursive: true) on a root folder with contents like below:
- simple folder
- shared folder
- simple file
will contain files and subdirectories from "simple folder" and "simple file" but will contain nothing from "shared folder".
Calling listFolder(recursive: true) on a shared folder itself will return no files and folders. And it doesn't matter if we're scanning from an account that created the shared folder, or from an account that was invited to use the shared folder.
After trying to find something else in the SDK for listing shared folders (and failing at it), I decided to ask here. Is this a bug in the API? I suppose it is, because listFolder() doesn't require any special permissions without recursive flag set to true. Or do I miss something here?
Also, if it is a bug, could you please tell me how long do you think it will take to fix it? We're kinda getting ready to push another build into production and I REAAAAAAALLY don't want to write an awful workaround that will include sending a bunch of requests to scan the contents of a folder and its subfolders.
Is there anything I can do to help you speed up the bugfix?
Also, do you accept new contributors to SwiftyDropbox? I have a bunch of new ideas, and would be happy to help you improve the SDK.
Thanks in advance, Gregory!
Best regards,
Aibek.
2 Replies
Replies have been turned off for this discussion
- Greg-DB10 years ago
Dropbox Community Moderator
Hi Aibek, when you see this behavior, does your ListFolderResult have hasMore set to true? If so, you need to call listFolderContinue to get the rest of the results. You should have code to handle that in any case, but I don't see a mention of listFolderContinue in your post.
Let me know if you are already handling that though.
- Aibek D.10 years agoNew member | Level 1
Hi Gregory,
Thanks for a quick response!
You were right, checking for hasTrue and retrieving more files did decide the problem! The nature of the problem and the fact it didn't list only shared folders, even if there was only 5-10 files in the whole dropbox account made me think that it's a bug.
Big thank you again!
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,034 PostsLatest Activity: 22 minutes ago
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!