BurntSushi / walkdir

Rust library for walking directories recursively.
The Unlicense
1.21k stars 106 forks source link

`follow_root_links()` in `WalkDir`. #170

Closed Byron closed 10 months ago

Byron commented 1 year ago

With it it's possible to control whether symlinks in the traversal root are followed, while defaulting to 'true' like before, or if they are handled like ordinary links.

Created in response to this cargo issue.

Byron commented 1 year ago

@BurntSushi I'd appreciate approval for the workflow to see if CI works. I did run it on my own fork but it seems to sometimes fail with rustup.exe now on Windows. However, I hope I will be luckier here. Thank you.

BurntSushi commented 1 year ago

Ug right. I really really hate the "Approve and Run" thing.

BurntSushi commented 1 year ago

The MSRV for walkdir is really old and I would have no problems bumping it to a newer version. But if it's just for simple/small things like [true, false] not implementing IntoIterator, then I'd prefer just leaving the MSRV alone for now.

Also, I see some lines that are over 80 columns because of long strings, and rustfmt refuses to wrap those automatically. So you might need to do it manually. :)

Byron commented 1 year ago

Ug right. I really really hate the "Approve and Run" thing.

I think I addressed the issues, but… it's needing approval again 🤦. I do know that you can change this behaviour in the settings of the project though.

Screenshot 2023-02-06 at 14 36 21

Maybe this can help to make it a little less cumbersome for all of us. It feels wrong to relegate you to clicking a button, really.

BurntSushi commented 1 year ago

Ooooo!!!! I didn't know about that. Sucks I have to set it for every repo, but I've just made it as loose as possible.

Byron commented 1 year ago

Great to hear I could help :)!

All tests are green now, in case you have any notes for me.

By the way, please feel free to make changes as you see fit yourself and push directly into this branch (gh pr checkout 170 sets you up for that). That way reviews tend to be way less taxing and require less (and often no) turnarounds - at least that's how I do them in my own repos.

flokli commented 10 months ago

@BurntSushi is there anything left for this to be merged?

BurntSushi commented 10 months ago

Thanks for the ping. This PR is on crates.io in walkdir 2.4.0.

flokli commented 10 months ago

Thanks!