You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

swong's avatar
swong
Explorer | Level 3
7 years ago

listFolderBuilder returns hasMore = true, but listFolderContinue returns 0 entries

Hi all,

See subject. This behaviour appears to be new (started happening in the last 24h) and I believe is different the description in the documentation:

> hasMore - If true, then there are more entries available. Pass the cursor to DbxUserFilesRequests.listFolderContinue(String) to retrieve the rest.

Is this behaviour correct? I am using Java SDK 2.1.1.

Thanks,

Stephen

  • Thanks! This generally shouldn't be very common, but it is possible and expected sometimes. The listFolder[Continue] interface doesn't guarantee a non-zero number of results (due to various aspects of how the backend is implemented), so it is possible to get empty pages like this. You should have your app handle these normally, e.g., looping over the entries to process them, which would just result in 0 iterations in this case. Apologies for the confusion!

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    Thanks for the report. To clarify, when you call listFolderContinue, does that response also have hasMore = true?

    • swong's avatar
      swong
      Explorer | Level 3

      No, the second request has entries = 0 & hasMore = false.

      • Greg-DB's avatar
        Greg-DB
        Icon for Dropbox Staff rankDropbox Staff

        Thanks! This generally shouldn't be very common, but it is possible and expected sometimes. The listFolder[Continue] interface doesn't guarantee a non-zero number of results (due to various aspects of how the backend is implemented), so it is possible to get empty pages like this. You should have your app handle these normally, e.g., looping over the entries to process them, which would just result in 0 iterations in this case. Apologies for the confusion!

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,910 PostsLatest Activity: 3 days ago
333 Following

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!