Commit 5fde2f4
rm: use "traversal failed" message when readdir fails during recursive 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>1 parent 7369f4d commit 5fde2f4
3 files changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
349 | 349 | | |
350 | 350 | | |
351 | 351 | | |
352 | | - | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
353 | 357 | | |
354 | 358 | | |
355 | 359 | | |
| |||
0 commit comments