Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leading doublestar inside braces fails to match #8

Open
gsoltis opened this issue May 11, 2023 · 0 comments
Open

Leading doublestar inside braces fails to match #8

gsoltis opened this issue May 11, 2023 · 0 comments

Comments

@gsoltis
Copy link

gsoltis commented May 11, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant