Closed oliverpool closed 2 years ago
escape pattern cannot be supported on windows and smb, because '\' is native path separator for both systems.
https://pkg.go.dev/path/filepath#Match
On Windows, escaping is disabled. Instead, '\' is treated as path separator.
oh, nevermind. I misinterpreted your comment.
sorry, I'm confused. are you saying that it should pass the test or not? I think it should not pass the test because we cannot support escape syntax for smb.
On Windows, escaping is disabled. Instead, '\' is treated as path separator.
I missed that, so you are right, the \
can be ignored (on linux as well?)
Hi,
I looked at your
glob
branch, and I think that it is quite complex.I was able to find an edge case: escaped brackets will be matched by the regex (but should not be).
I have added a test to reproduce (all the strings that match a given pattern should also match against the simplified pattern).