Doesn't match parent folder
GMZwinge opened this issue · 0 comments
GMZwinge commented
It should match parent folder otherwise it can lead to iterating unnecessarily over folder tree that will never match.
Eg: it should match:
match( '/path/x/**/*.ts', '/path/x/y/z/a.ts');
match( '/path/x/**/*.ts', '/path/x/y/z');
match( '/path/x/**/*.ts', '/path/x/y');
but not match:
match( '/path/x/**/*.ts', '/path/y/y/z');
match( '/path/x/**/*.ts', '/path/y/y');
One would need to iterate unnecessarily over the tree /path/y
, only to find out that no file can possibly match the pattern.