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

contents_first(false) still calls readdir before emitting the parent directory #168

Open
UhhhWaitWhat opened this issue Aug 24, 2022 · 1 comment · May be fixed by #188
Open

contents_first(false) still calls readdir before emitting the parent directory #168

UhhhWaitWhat opened this issue Aug 24, 2022 · 1 comment · May be fixed by #188
Labels

Comments

@UhhhWaitWhat
Copy link

I tried to implement a recursive chmod using walkdir (linux only). Sadly, the parent directory seems to be emitted by the iterator AFTER the call to readdir was done. This means that, if the parent directory originally has no read/execute permissions, the walker does not descend further, even though it could after I changed the parents permissions.

I'm not sure I would classify this as a bug, but I just wasted about 30 minutes trying to figure out why my code doesn't work, so a line of documentation specifying this behaviour might be useful.

@BurntSushi
Copy link
Owner

I think I would probably classify this as a bug? In particular, it seems like your use case would be a good one to support.

Fixing this might be a bit gnarly though.

@BurntSushi BurntSushi added the bug label Aug 24, 2022
@fdiakh fdiakh linked a pull request Oct 23, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants