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

"ignore" crate: Parallel walker should ignore broken symlinks #2431

Closed
wants to merge 1 commit into from
Closed

"ignore" crate: Parallel walker should ignore broken symlinks #2431

wants to merge 1 commit into from

Conversation

ruffe972
Copy link

@ruffe972 ruffe972 commented Feb 26, 2023

This fixes sharkdp/fd#746. "fd": uses "ignore" crate from this repo. Steps to reproduce:

  • Create parallel walker with "follow links" option enabled.
  • Create broken symlink with the name broken_symlink, for example.
  • Add "broken_symlink" to ignored files.
  • Get walker dir entry results.

Expected: walker doesn't return dir entry result for the link.
Actual: walker returns error result for the link.

Note that I didn't fix similar bug in single-threaded walker. I'm new to Rust so it's a bit difficult for me, but if it's required for this PR to be merged, I'll fix single-threaded walker too.

@BurntSushi
Copy link
Owner

I've opened #2552 for this. I'm not sure this is the right way to fix this issue, and the fact that the single threaded case isn't fixed means I don't want to bring this in as-is. I looked and fixing the single threaded case appears tricky.

I'm going to close this for now in favor of tracking #2552 as a bug. Since I don't consider this to be a high priority bug, I'm going to defer fixing this until I've had a chance to overhaul ignore's internals.

@BurntSushi BurntSushi closed this Jul 7, 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

Successfully merging this pull request may close these issues.

Broken links don't respect --exclude when using --follow
2 participants