Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

childrenIgnored wrong return? #552

Closed
pilaoda opened this issue Sep 20, 2023 · 2 comments
Closed

childrenIgnored wrong return? #552

pilaoda opened this issue Sep 20, 2023 · 2 comments

Comments

@pilaoda
Copy link

pilaoda commented Sep 20, 2023

node-glob/src/ignore.ts

Lines 109 to 111 in ed22c06

for (const m of this.absoluteChildren) {
if (m.match(fullpath)) true
}

Maybe I misunderstanding the purpose here, shouldn't this block return true rather single true?

@pilaoda
Copy link
Author

pilaoda commented Sep 20, 2023

I run into a problem that the ignore option doesn't ignore a infinite symlink directory and iterate its infinite files. I think the problem is this code which doesn't work as expected.

@isaacs
Copy link
Owner

isaacs commented Sep 20, 2023

Omg, yes, that is obviously a bug, good spot.

What's funny is that it actually still works, assuming the path isn't an ELOOP, just way slower because it iterates over every file.

@isaacs isaacs closed this as completed in 3e22cf0 Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants