Skip to content

rm: use "traversal failed" message when readdir fails during recursive removal#11427

Open
kevinburkesegment wants to merge 3 commits intouutils:mainfrom
kevinburkesegment:rm-traversal-failed
Open

rm: use "traversal failed" message when readdir fails during recursive removal#11427
kevinburkesegment wants to merge 3 commits intouutils:mainfrom
kevinburkesegment:rm-traversal-failed

Conversation

@kevinburkesegment
Copy link

When readdir fails mid-traversal (e.g., due to I/O errors), GNU rm reports "traversal failed:

" rather than "cannot remove ''". Update the error handling in safe_remove_dir_recursive_impl to match this behavior.

Fixes GNU test: tests/rm/rm-readdir-fail.sh

kevinburkesegment and others added 2 commits March 19, 2026 22:32
…e removal

When readdir fails mid-traversal (e.g., due to I/O errors), GNU rm
reports "traversal failed: <dir>" rather than "cannot remove '<dir>'".
Update the error handling in safe_remove_dir_recursive_impl to match
this behavior.

Fixes GNU test: tests/rm/rm-readdir-fail.sh

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

2 participants