Commit 198f365
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 2ef0aea commit 198f365
1 file changed
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
1377 | 1379 | | |
1378 | 1380 | | |
1379 | 1381 | | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
0 commit comments