mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-22 22:58:25 +00:00
Merge remote-tracking branch 'origin/pr/1091'
* origin/pr/1091: Escape plus sign (fixes #1090)
This commit is contained in:
commit
996cbbca38
@ -55,6 +55,7 @@ func Convert(pattern string, flags int) (*regexp.Regexp, error) {
|
||||
pattern = strings.Replace(pattern, "\\.", "[:escapeddot:]", -1)
|
||||
}
|
||||
pattern = strings.Replace(pattern, ".", "\\.", -1)
|
||||
pattern = strings.Replace(pattern, "+", "\\+", -1)
|
||||
pattern = strings.Replace(pattern, "**", "[:doublestar:]", -1)
|
||||
pattern = strings.Replace(pattern, "*", any+"*", -1)
|
||||
pattern = strings.Replace(pattern, "[:doublestar:]", ".*", -1)
|
||||
|
@ -55,6 +55,8 @@ func TestIgnore(t *testing.T) {
|
||||
|
||||
{filepath.Join("dir3"), true},
|
||||
{filepath.Join("dir3", "afile"), true},
|
||||
|
||||
{"lost+found", true},
|
||||
}
|
||||
|
||||
for i, tc := range tests {
|
||||
|
1
internal/ignore/testdata/.stignore
vendored
1
internal/ignore/testdata/.stignore
vendored
@ -4,3 +4,4 @@ bfile
|
||||
dir1/cfile
|
||||
**/efile
|
||||
/ffile
|
||||
lost+found
|
||||
|
Loading…
x
Reference in New Issue
Block a user