Start 2025 on time and up to date. Seamlessly integrate your calendars into Dropbox with these simple steps.

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!