Skip to content

fix: remove Windows directory symlinks recursively#89

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

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

Conversation

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

close #84

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

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.

Can't rm directory symbolic link

1 participant