mirror of
https://github.com/syncthing/syncthing.git
synced 2026-04-30 11:14:59 -04:00
Based on the discussion in https://forum.syncthing.net/t/towards-syncthing-2-0/24072/35 This PR adds the ability for Windows users to use the pipe character (|) to escape the metacharacters *, ?, [, and { in .stignore files. Additionally, this PR adds the ability for the user to set the escape character to backslash, or any character they want, by adding a line in the form: #escape=X (where X is any single rune), to the top of an .stignore file. This would allow users to use the same .stignore file across platforms, by simply adding #escape=\ to the top of the file. ### Testing All tests pass in CI. ### Documentation See https://github.com/syncthing/docs/pull/919 Fixes #10057: Support escaping in .stignore files on Windows Fixes #7547: Ignore pattern with \[ and \] does not work