Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix #111 #113

Merged
merged 1 commit into from
May 27, 2024
Merged

Fix #111 #113

merged 1 commit into from
May 27, 2024

Conversation

JRF63
Copy link
Contributor

@JRF63 JRF63 commented May 27, 2024

The root cause here is that this test should be deleting t and not the deeply nested sub-directory under it.

The error is because Rust's implementation of remove_dir_all is doing recursion which doesn't close the directory handles until it reaches the deepest subdir. The implementation of rm can delete t because it opens only one handle so it won't get the "Too many open files" error. It does comes with the tradeoff of having to cache the visited files though.

@jgarzik jgarzik merged commit d1b877d into rustcoreutils:main May 27, 2024
2 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants