Skip to content

fix: prevent destructive overwrite of decompression directories - #1044

Draft
fzlzjerry wants to merge 1 commit into
ouch-org:mainfrom
fzlzjerry:fix/decompress-directory-overwrite
Draft

fix: prevent destructive overwrite of decompression directories#1044
fzlzjerry wants to merge 1 commit into
ouch-org:mainfrom
fzlzjerry:fix/decompress-directory-overwrite

Conversation

@fzlzjerry

Copy link
Copy Markdown

Closes #1043.

Summary

  • remove the destructive overwrite choice when a decompression conflict target is a directory
  • keep rename, merge, and skip for directory conflicts while preserving overwrite for actual file conflicts
  • update the multi-format merge coverage and add regressions for preserving unrelated directory contents and overwriting a single-file target
  • document the fix in the changelog

Validation

  • cargo test --locked
  • cargo test --locked --no-default-features
  • cargo test --locked --no-default-features --features unrar,use_zlib,use_zstd_thin
  • cargo clippy --locked --all-targets -- -D warnings
  • cargo clippy --locked --no-default-features --all-targets -- -D warnings
  • cargo +nightly fmt -- --check

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.

Bug: Decompressing with --dir flag and choosing 'overwrite' wipes parent directory contents

1 participant