Skip to content

Edge case: overlapping roots with --ignore #45

@defuse

Description

@defuse

Claude said: "If one root is a prefix of the other (e.g. original=/data, backup=/data/backup) AND the backup path involves symlinks, the four-branch strip_prefix chain in cli.rs:229-245 can match an ignore path against the wrong root. For example, --ignore /data/backup/cache would strip the /data original prefix first (getting suffix backup/cache) and store canonical_original/backup/cache, which wouldn't match the walked path canonical_backup/cache if /data/backup resolves differently through canonicalization."

It might be fine to leave it as-is, but at least document it in the comment in the code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions