Skip to content

Filenames with extended characters not ignored correctly on macOS #9597

Closed

Description

@SimonPickup

What happened?

With .stignore content:

bäd
bad

The file bad is ignored by bäd is not.

I also found a workaround. If you use .stignore` content:

ba*d

it matches and ignores both files. Possibly ba?d would also match, but I have tested it.

I believe this is because the NFD-encoded paths (on macOS) are being matched against NFC-encoded ignore patterns.

The solution is to convert to NFC-encoding before matching.

I have confirmed the bug and a proposed fix by modifying the existing unit test.

Note that some non-ASCII characters work, I presume those that have identical NFC and NFD form.

PR forthcoming.

Syncthing version

v1.27.8

Platform & operating system

macOS (64-bit ARM)

Browser version

No response

Relevant log output

No response

Activity

  1. added
    bug
    needs-triage
    on Jun 28, 2024
  2. removed
    needs-triage
    on Jul 8, 2024
  3. added 5 commits that reference this issue on Sep 18, 2024
    cf569c3
    b3dcb96
    c70cb32
    f5b71bf
    a7fceec
  4. added 2 commits that reference this issue on Sep 28, 2024
    2570268
    cc76661
  5. added a commit that references this issue on Sep 28, 2024
    605fd6d
  6. added this to the v1.28.0 milestone on Oct 2, 2024
  7. added 2 commits that reference this issue on Jan 20, 2025
  8. added
    frozen-due-to-age
    on Jul 1, 2026
  9. locked and limited conversation to collaborators on Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugfrozen-due-to-age

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions