Skip to content

dropbox: ChangeNotify root trimming assumes matching PathDisplay casing #9692

Closed

Description

@MikeeI

Summary

Dropbox ChangeNotify removes the configured backend root from PathDisplay using case-sensitive strings.TrimPrefix. The pinned Dropbox SDK documents that PathDisplay casing can differ from the user's filesystem in rare instances. When the root casing differs, ChangeNotify can pass the full Dropbox path to its consumer as though it were relative to the configured root.

Evidence

  • Source-proven: backend/dropbox/dropbox.go:1720-1739 applies strings.TrimPrefix(info.PathDisplay, f.slashRootSlash) to file, folder, and deletion events.
  • Source-proven dependency contract: Dropbox SDK v6.4.0 documents that PathDisplay is display-only and that its casing may not correctly match the user's filesystem in rare instances.
  • Historical issue #5165 involved incorrect ChangeNotify path manipulation with TrimLeft, not this root-casing condition.
  • Not observed: no Dropbox event with mismatched root casing has been captured and the resulting VFS cache behavior has not been reproduced.

Source review environment:

rclone v1.75.0-DEV
- os/version: ubuntu 24.04 (64 bit)
- os/kernel: 6.8.0-107-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.26.5
- go/linking: dynamic
- go/tags: none

Impact

A change below a case-mismatched configured root may invalidate a different VFS cache path while leaving the actual relative path stale. This user-visible effect has not been measured.

Question

Should ChangeNotify derive root membership from Dropbox's case-insensitive path representation before emitting the relative display path?

I checked all relevant issues, comments, pull requests, and forum threads; this report is not a duplicate.

Involvement

I am reporting this finding only and am not currently proposing a pull request.

Investigated extensively with GPT-5.6 Sol (xhigh reasoning effort), using Oh My Pi as the agent framework.

Activity

  1. ncw commented on Jul 30, 2026

    @ncw
    Member

    Confirmed against master - slashRootSlash keeps the user-typed casing (the "lowercase" comments on those struct fields are stale; nothing lowercases them), while PathDisplay comes back with server-side display casing, so a case-mismatched configured root makes the TrimPrefix silently fail and ChangeNotify emits absolute paths. The consumer then invalidates nonexistent entries and the mount stays stale until --dir-cache-time.

    Real but narrow: it needs mount/serve with polling, a non-root remote path, and casing typed differently from the display casing, and the harm is bounded staleness. Small fix - case-insensitive prefix match (or match on PathLower), plus fixing the stale comments. Low priority.

  2. added 2 commits that reference this issue on Aug 27, 2026
    9f6dba9
    4af6427
  3. ncw commented on Aug 27, 2026

    @ncw
    Member

    I've merged this to master now which means it will be in the latest beta in 15-30 minutes and released in v1.75.1

  4. added a commit that references this issue on Sep 4, 2026
    feb0664
  5. added a commit that references this issue on Oct 6, 2026
    75bb228
  6. added a commit that references this issue on Nov 21, 2026
    81458f3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions