-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fix Globber.constant_entry?
matching patterns
#13955
Fix Globber.constant_entry?
matching patterns
#13955
Conversation
Not sure if the spec files will cause issues on windows since they have backslashes and asterisks in their filenames edit: they did |
Hey @HertzDevil any idea what's going on with Windows? https://github.com/crystal-lang/crystal/actions/runs/6762195146/job/18378622061 |
The Dir.glob(%q(spec/std/data/dir\*.txt)) # => []
Dir.glob(%q(spec\std\data\dir/*.txt)) # => ["spec\\std\\data\\dir\\f1.txt", "spec\\std\\data\\dir\\f2.txt", "spec\\std\\data\\dir\\g2.txt"] But if # okay
Dir["#{Path[datapath].to_posix}/dir/*.txt"].sort.should eq [
datapath("dir", "f1.txt"),
datapath("dir", "f2.txt"),
datapath("dir", "g2.txt"),
].sort Note that this pertains to Lines 153 to 155 in 72e6b02
|
… fix/dir/globber-constant-entry-matching-patterns
Thanks for the info! I converted them to |
This seems to affect stuff outside the glob spec. I don't think I can do much without a Windows machine, feel free to take over this PR! |
Co-authored-by: Quinton Miller <[email protected]>
fix: #13954
This PR adds
'{', '[', '\\'
to Globber'sconstant_entry?
so it matches patterns that include them without*
or?