Skip to content

fix: remove Windows directory symlinks recursively#12642

Open
a-rookie-of-C-language wants to merge 1 commit into
uutils:mainfrom
a-rookie-of-C-language:fix/windows-rm-symlinkd
Open

fix: remove Windows directory symlinks recursively#12642
a-rookie-of-C-language wants to merge 1 commit into
uutils:mainfrom
a-rookie-of-C-language:fix/windows-rm-symlinkd

Conversation

@a-rookie-of-C-language
Copy link
Copy Markdown

Summary

  • Fix rm -rf on Windows directory symlinks (SYMLINKD).
  • Avoid treating directory symlinks as regular files during recursive removal.
  • Remove the link itself with the directory removal path instead of calling remove_file().
  • Avoid counting directory symlink targets recursively for progress accounting.

Validation

  • cargo check --manifest-path deps\coreutils\Cargo.toml -p uu_rm
  • cargo test --manifest-path deps\coreutils\Cargo.toml --features rm --test tests test_recursive_symlink_dir_removes_link_not_target

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 5, 2026

GNU testsuite comparison:

Skip an intermittent issue tests/date/date-locale-hour (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/cp/link-heap is now passing!
Congrats! The gnu test tests/tail/pipe-f is now passing!

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.

1 participant