Mola-maker opened a new pull request, #9292: URL: https://github.com/apache/opendal/pull/9292
Closes #9291 ## Why Dropbox `list_folder` returns the basename in `name` and the full path in `path_display`. The lister kept `name`, so `dir/a.txt` and `dir/sub/nested.txt` both collapsed, and the listed directory itself was missing. ## What changed Map `path_display` to an operator-relative path, keep a trailing slash on folders, and emit the requested directory on the first page. ## Scope `core/services/dropbox/src/lister.rs` and its unit tests. `Cargo.lock` records the `futures` dev-dependency used by the fixture transport. ## Tradeoffs The directory entry is synthesized from the path that was listed, because `list_folder` does not return that folder. A successful response is treated as proof the path is a directory. Entries whose `path_display` is outside the configured root return `Unexpected`. ## Blast Radius Dropbox list and recursive list paths change for every object below the operator root. A root child named `a.txt` stays `a.txt`. Stat, read, and write paths are unchanged. ## Verification Before the fix, `cargo test -p opendal-service-dropbox --lib test_list_keeps_directory_prefix_and_lists_itself` failed with `["a.txt", "nested.txt", "sub/"]`. After the fix, that test and `test_list_strips_configured_root` pass, along with `from_uri_sets_root`. No live Dropbox account was called. # Rationale for this change Listing `dir/` must return `dir/a.txt`, matching the list behavior tests. # What changes are included in this PR? `DropboxLister` reads `path_display` and adds the listed directory on the first page. # Are there any user-facing changes? Dropbox `list` results now include the directory prefix and the listed directory. # Breaking changes None # AI Usage Statement - Harness: Cursor Cloud Agent - Model: Grok 4.7 - Effort: high - Role: Reproduced the lister output from the documented `list_folder` JSON on current main, wrote the failing test, and changed the path mapping. No live Dropbox call. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
