Repository navigation
dropbox: decode received shared-file names - fixes #9707 - #9796
Merged
ncw merged 1 commit intoAug 25, 2026
Merged
Conversation
listSharedFolders already decoded shared-folder names with f.opt.Enc.ToStandardName, but listReceivedFiles stored the raw name returned by the Dropbox API unchanged. Names that require encoding (e.g. a trailing space, which Dropbox itself rejects, so rclone stores it as "name␠" via EncodeRightSpace) were therefore shown under their raw, encoded form for received files instead of being decoded back to the standard name, and findSharedFile could not resolve such a file by its standard name. Apply the same ToStandardName conversion listSharedFolders uses.
sk-sanjay01
force-pushed
the
fix-9707-dropbox-shared-file-encoding
branch
from
August 24, 2026 05:25
1932796 to
a3538c9
Compare
ncw
approved these changes
Aug 24, 2026
ncw
left a comment
Member
There was a problem hiding this comment.
This looks like a nice fix - thank you :-)
I'll merge when CI goes green
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change do?
listSharedFoldersdecodes shared-folder names withf.opt.Enc.ToStandardNamebefore returning them, but
listReceivedFiles(which lists files individuallyshared with the user, not folders) stored the raw name from the Dropbox API
unchanged. A file whose real name needs backend-specific encoding - e.g. a
trailing space, which Dropbox itself rejects, so rclone's
EncodeRightSpaceoption stores it as
name␠- was shown under that raw encoded form insteadof being decoded back to the standard name, and
findSharedFilecould notresolve such a file when a caller looked it up by its standard name, since it
compares against the raw stored name.
This applies the same
ToStandardNameconversionlistSharedFoldersalreadyuses, so received-file names go through the same decoding as every other
listing path in this backend.
Was the change discussed in an issue or in the forum before?
Fixes #9707, opened by the reporter, who traced the inconsistency to these
exact two functions and the missing conversion. Not yet acknowledged by a
maintainer, so please treat the approach as up for discussion - it is a
one-line change that mirrors the already-correct sibling function
(
listSharedFolders), so I don't expect it to be controversial, but flaggingper the contribution guidelines.
Checklist
listSharedFolderspattern; issue not yet maintainer-acknowledged)test_allpasses for this backend and if submitting a new backend can provide a test account for the integration tester. (I do not have a Dropbox account to run the live integration suite.go build ./...,go vet ./...,gofmt, andgo test ./backend/dropbox/...are all clean. Added two unit tests that exercise the reallistReceivedFiles/findSharedFilecode against a mock Dropbox API server standing in for the live API; confirmed both fail without this fix and pass with it. Happy to provide a test account later if a maintainer can help verify against the live API in the meantime.)