olson-sean-k / wax

Opinionated and portable globs that can be matched against paths and directory trees.
https://glob.guide
MIT License
112 stars 10 forks source link

Prevent the invariant prefix optimization from defying the walk behavior #57

Closed arlyon closed 3 months ago

arlyon commented 8 months ago

Our logic for calculating the anchor can cause globs that have an invariant that cross a symlink to traverse that symlink even if the walk behaviour is set to ignore them. To solve this, we need to check if any of the parent files are symlinks and use the most-recently-found symlink. I left a todo in, because if anchor were to know about the walk behaviour then we could improve performance a little, but I want to leave that decision up to you.

Cheers!

Alex

arlyon commented 3 months ago

I believe this is obsolete