Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compression in zip outputs when compress option is supplied #182

Merged
merged 2 commits into from
Jul 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion acquire/outputs/zip.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
self.path = path.with_suffix(path.suffix + ext)

if compress:
self.compression = zipfile.ZIP_LZMA
self.compression = zipfile.ZIP_DEFLATED

Check warning on line 41 in acquire/outputs/zip.py

View check run for this annotation

Codecov / codecov/patch

acquire/outputs/zip.py#L41

Added line #L41 was not covered by tests
else:
self.compression = zipfile.ZIP_STORED

Expand Down Expand Up @@ -75,6 +75,7 @@
info = zipfile.ZipInfo()
info.filename = output_path
info.file_size = size or 0
info.compress_type = self.compression

Check warning on line 78 in acquire/outputs/zip.py

View check run for this annotation

Codecov / codecov/patch

acquire/outputs/zip.py#L78

Added line #L78 was not covered by tests

if entry:
if entry.is_symlink():
Expand Down
Loading