glob-match
glob-match copied to clipboard
Leading doublestar inside braces fails to match
If you have a glob that starts with a **
, the behavior changes based on whether or not you wrap it in {}
s. For instance:
assert!(glob_match("**/*b", "ab"));
assert!(glob_match("{**/*b}", "ab"));
The first assert passes, whereas the second one does not. I believe the issue is here, where the code to detect a leading doublestar is hardcoded to compare against the start of the glob, rather than the start of the current option inside the braces.