Skip to content

Support escaping in .stignore files on Windows #10057

Description

@rasa

Feature description

On https://forum.syncthing.net/t/towards-syncthing-2-0/24072/35 @tomasz86 requested:

As something that could be introduced in Syncthing v2, I would like to suggest improving ignore patterns handling on Windows by changing how \ is treated. This is a breaking change, but basically, \ would be used as an escape character (as is the case in other operating systems), and if one wanted to use it as a path separator, they would need to escape it as \. Using double \ isn’t new in the Windows world, as path separators already need to be escaped like that, e.g. in the Registry.

This change would allow Windows users to escape other characters in ignore patterns, like { or [, which isn’t possible right now, as \ is treated literally.

Problem or use case

See above.

Alternatives or workarounds

Rename files to remove metacharacters.

Activity

  1. added
    enhancement
    needs-triage
    on Apr 13, 2025
  2. self-assigned this
    on Apr 13, 2025
  3. removed
    needs-triage
    on Apr 13, 2025
  4. added theissue type on Apr 13, 2025
  5. ProactiveServices commented on Apr 13, 2025

    @ProactiveServices
    Contributor

    Related: #7547

  6. added 4 commits that reference this issue on Apr 13, 2025
    d9c1c0b
    cffa4a9
    d3f88b8
    7ff0810
  7. removed
    enhancement
    on May 30, 2025
  8. added
    enhancement
    on May 30, 2025
  9. added a commit that references this issue on Jun 29, 2025
    9fc2b27
  10. added a commit that references this issue on Aug 5, 2025
    4946244
  11. added
    frozen-due-to-age
    on Aug 5, 2026
  12. locked and limited conversation to collaborators on Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementfrozen-due-to-age

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions