Skip to content

dropbox: match shared-folder and received-file names case-insensitively - #9869

Merged
ncw merged 1 commit into
rclone:masterfrom
hsdfat:dropbox-shared-mode-case-insensitive
Sep 8, 2026
Merged

ncw merged 1 commit into
rclone:masterfrom
hsdfat:dropbox-shared-mode-case-insensitive

Conversation

@hsdfat

@hsdfat hsdfat commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

What does this change do?

The Dropbox backend advertises CaseInsensitive: true, but the special shared-folder and received-file lookup paths compared names with exact, case-sensitive Go string equality:

  • findSharedFolder used entry.(*fs.Dir).Remote() == name
  • findSharedFile used entry.(*Object).remote == name

These functions search API listings by hand rather than resolving the name through Dropbox's normal path lookup, so a shared item listed as Project was not found when requested as project, contrary to the backend's advertised behaviour.

This makes both comparisons case-insensitive with strings.EqualFold, consistent with what the backend advertises. Normal-path handling is unchanged, and this does not touch ChangeNotify (tracked separately in #9692).

Fixes #9706.

Tests

Added unit tests in backend/dropbox/dropbox_internal_test.go covering case-insensitive shared-folder and received-file lookup, plus the not-found paths. Both fail on unpatched code.

They are built on the newSharingTestFs mock-server helper added in #9796, rather than a hand-rolled fake sharing.Client, so they exercise the real client and do not break when the SDK's interface changes.

This is a Dropbox backend change, so a live go run ./fstest/test_all -backends dropbox run is worth doing before merge. I do not have a Dropbox account to run that against.

…ly - fixes rclone#9706

The Dropbox backend advertises CaseInsensitive: true, but the two
shared-mode lookup helpers compared names with an exact, case-sensitive
==, so a shared folder or received file named "Project" could not be
found when requested as "project". Use strings.EqualFold in both
findSharedFolder and findSharedFile to honour the advertised
case-insensitivity.

Fixes rclone#9706
@hsdfat
hsdfat requested a review from ncw as a code owner September 5, 2026 14:18

@ncw ncw left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the fix

@ncw
ncw merged commit b549554 into rclone:master Sep 8, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dropbox: shared-mode lookup uses case-sensitive name matching

2 participants