Skip to content

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

Closed
kevinburkesegment wants to merge 264 commits intouutils:mainfrom
kevinburkesegment:rm-traversal-failed
Closed

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

Conversation

@kevinburkesegment
Copy link
Copy Markdown
Contributor

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

@sylvestre
Copy link
Copy Markdown
Contributor

sorry but could you please add a test to cover this case ?

RenjiSann and others added 28 commits April 6, 2026 10:48
Switch to unstable sorting as it is in-place, and remove an unnecessary string conversion.
Also switches to var_os for alloc-free code.
Remove format machinery, an unnecessary allocation and a duplicated function.
Should improve codegen, especially in debug mode.
Renames and documents PathDataDisplayName::Moo to _::Custom; also makes code more idiomatic and restores an accidentally-removed warning.
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
Co-authored-by: xtqqczze <45661989+xtqqczze@users.noreply.github.com>
sylvestre and others added 23 commits April 6, 2026 10:48
…uutils#11673)

* dd: do not show zero multiplier warning when zero is the multiplicand

* tests/dd: test zero multiplier warning when zero is the multiplicand
…uffix and fixed String format (uutils#11674)

* numfmt: preserve fractional digits when --from-unit is used without suffix and fixed String format

* numfmt: simplify redundant if branches caught by clippy

* numfmt: fix precision condition to only preserve decimals when input has no unit suffix
Formats like "%-e" previously bypassed ICU localization of "%b"/"%A"
because the modifier fast-path ran before localize_format_string().
Localize first, then run the modifier pass on the already-localized
format. Fixes uutils#11240.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 6, 2026

GNU testsuite comparison:

Skip an intermittent issue tests/date/date-locale-hour (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/pr/bounded-memory (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/cut/bounded-memory (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/tail/retry is no longer failing!
Congrats! The gnu test tests/rm/many-dir-entries-vs-OOM is now passing!

…e removal

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sylvestre
Copy link
Copy Markdown
Contributor

please reopen when it is ready

@sylvestre sylvestre closed this Apr 20, 2026
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.