Skip to content

feat: auto-create destination directory on extract#102

Merged
bug-ops merged 1 commit intomainfrom
auto-create-dest-dir
Mar 15, 2026
Merged

feat: auto-create destination directory on extract#102
bug-ops merged 1 commit intomainfrom
auto-create-dest-dir

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Mar 15, 2026

Summary

  • Adds DestDir::new_or_create() that calls create_dir_all before delegating to DestDir::new() for validation
  • Updates all three format extractors (tar, zip, sevenz) to use the new constructor
  • Matches behavior of tar -C, unzip -d, and 7z x -o

Test plan

  • 5 new unit tests in dest_dir.rs: nonexistent dir, nested path, existing dir, file-not-dir conflict, unwritable parent
  • All 538 tests pass (cargo nextest run)
  • Full pre-commit suite passes (fmt, clippy, rustdoc, deny)

Closes #78

@github-actions github-actions bot added core Changes to exarch-core docs Documentation labels Mar 15, 2026
If the destination directory does not exist, create it (including all
intermediate directories) before extraction begins, matching the
behavior of tar, unzip, and 7z.

Adds DestDir::new_or_create() which calls create_dir_all then delegates
to DestDir::new() for existing validation. All three format extractors
(tar, zip, sevenz) updated to use the new constructor.

Closes #78
@bug-ops bug-ops force-pushed the auto-create-dest-dir branch from 0f18201 to 14cbb39 Compare March 15, 2026 01:36
@bug-ops bug-ops enabled auto-merge (squash) March 15, 2026 01:36
@bug-ops bug-ops merged commit 6af588d into main Mar 15, 2026
20 checks passed
@bug-ops bug-ops deleted the auto-create-dest-dir branch March 15, 2026 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Changes to exarch-core docs Documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

enhancement: auto-create destination directory on extract

1 participant