Skip to content

fix: prevent destructive overwrite of decompression directories - #1044

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

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

@fzlzjerry
fzlzjerry marked this pull request as ready for review August 11, 2026 08:57
Copilot AI lite review requested due to automatic review settings August 11, 2026 08:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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

2 participants