glob icon indicating copy to clipboard operation
glob copied to clipboard

** does not match zero directories

Open houmain opened this issue 3 years ago • 2 comments

Hi, thank you for this nice library!

I think glob::rglob("dir/**/*.ext") should match:

  • dir/file.ext
  • dir/sub/file.ext
  • dir/sub/sub/file.ext

Currently it only matches:

  • dir/sub/file.ext
  • dir/sub/sub/file.ext

Or how else one can recursively get all .ext files within dir?

houmain avatar Feb 23 '21 08:02 houmain

Yes, I agree. Glob in this case should include dir/file.ext. Thanks for reporting!

p-ranav avatar Feb 23 '21 14:02 p-ranav

Is this issue fixed with the merge of #26 or still open? We are using this library in a project and in our testing, this still doesn't work.

If I have the following file tree:

$ tree test
test
|-- dir
|   |-- dir1
|   |   `-- test2.txt
|   `-- test1.txt
`-- test0.txt

and try to use the rglob function with the pattern test/**/*.txt on the folder test, it selects test1.txt and test2.txt, but not test0.txt

destructor64 avatar Jan 19 '24 14:01 destructor64