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

Partial compression detection false-positive leads to wrong compressed format #285

Closed
marcospb19 opened this issue Oct 13, 2022 · 0 comments · Fixed by #286
Closed

Partial compression detection false-positive leads to wrong compressed format #285

marcospb19 opened this issue Oct 13, 2022 · 0 comments · Fixed by #286
Labels
bug Something isn't working

Comments

@marcospb19
Copy link
Member

marcospb19 commented Oct 13, 2022

Version

385a630 (main branch)

Description

I suspect Ouch is detecting extensions like .tar.zst as part of .tar.gz and skipping the .gz compression part.

Current Behavior

When trying to compress an archive like this:

$ ouch c less.pkg.tar.zst less.tar.gz

It outputs:

[INFO] Partial compression detected. Compressing less-1-590.pkg.tar.zst into less.tar.gzPartial compression detected. Compressing less-1-590.pkg.tar.zst into less.tar.gz

And then, trying to decompress it, Ouch warns:

~/ouch ouch d less.tar.gz
[WARNING] The file extension: `gz` differ from the detected extension: `tar`
Do you want to decompress 'less.tar.gz'? [Y/n] 

Expected Behavior

Partial compression should not trigger in this scenario, and the archive should be formated with .tar.gz.

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant