Skip to content

Windows: make read_dir stop iterating after the first error is encountered #142453

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ChrisDenton
Copy link
Member

@ChrisDenton ChrisDenton commented Jun 13, 2025

This also essentially makes the ReadDir iterator fused. Which I think is pretty much what people expect anyway.

FindNextFileW doesn't document what happens if you call it after iteration ends or after an error so we're probably in implementation defined territory at that point.

Fixes #142411

@rustbot
Copy link
Collaborator

rustbot commented Jun 13, 2025

r? @ibraheemdev

rustbot has assigned @ibraheemdev.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jun 13, 2025
@ibraheemdev
Copy link
Member

This makes sense to me, but I'd like someone from libs-api to take a look. r? libs-api

@rustbot rustbot added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Jun 13, 2025
@rustbot rustbot assigned m-ou-se and unassigned ibraheemdev Jun 13, 2025
@ChrisDenton
Copy link
Member Author

r? @Amanieu maybe. Also I should probably cross-reference #142452.

@rustbot rustbot assigned Amanieu and unassigned m-ou-se Jun 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ReadDir on Windows can return error infinitely when run on removable path
5 participants