Deewiant / glob

Haskell library for glob matching
https://deewiant.iki.fi/projects/glob/
Other
25 stars 8 forks source link

Handle repeated slashes in ** wildcards #22

Closed hdgarrood closed 7 years ago

hdgarrood commented 7 years ago

Fixes #16

Deewiant commented 7 years ago

This is a bit more complex than I expected, but maybe I didn't think it through well enough. I was considering modifying getRecursiveContents to apply a given number of extra slashes at the last level. Do you think that that would work and end up being simpler?

hdgarrood commented 7 years ago

I can't quite see how that would work; if we had a pattern like **//foo/bar.txt then presumably putting extra slashes at the last level in getRecursiveContents would give us matches like dir/foo//bar.txt?

hdgarrood commented 7 years ago

Totally - yeah it's not trivial, definitely. Thanks for the review; I'll get started on your suggestions.

hdgarrood commented 7 years ago

How's this?

Deewiant commented 7 years ago

Looks good, thanks. The comment is a fair bit longer than I expected but that's not a bad thing. :-)

Seems that prop_commonDirectory is failing in some of the builds, but that has nothing to do with these changes.

hdgarrood commented 7 years ago

Oh, oops, would you like me to take a look at that?

Deewiant commented 7 years ago

Feel free!