-
-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
tinyglobby produces different results than fast-glob for some patterns when deep is set. Reproducible on win10 and archlinux (via WSL).
- My branch - https://github.com/outslept/tinyglobby/tree/fix/deep-option
- Test file - https://github.com/outslept/tinyglobby/blob/fix/deep-option/test/deep.test.mjs
Globstar with deep = 1 returns extra files compared to fast-glob.
Parent-directory patterns (../**/*.txt) miss matches compared to fast-glob.
Thoughts:
normalizePatternmoves the root up, but the processed match stays relative to the original cwd (i.e., it still contains the../prefix). The walker crawls fromroot=parent(producing paths likechild/deep.txt), while the matcher expects paths relative to cwd (../child/deep.txt). That mismatch (root vs cwd) leads to no matches.- The
calculatedMaxDepthlooks correct in logs, so it shouldn't be an arithmetic issue I guess
Metadata
Metadata
Assignees
Labels
No labels