Skip to content

Support escaping in .stignore files on Windows #10057

@rasa

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.

Metadata

Metadata

Assignees

Labels

enhancementNew features or improvements of some kind, as opposed to a problem (bug)

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions