-
Notifications
You must be signed in to change notification settings - Fork 76
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
decompress: don't panic on .tar.zip
, .zip.zip
, etc
#432
base: main
Are you sure you want to change the base?
Conversation
Previous behavior: we always decompress all formats in the chain for all supported files. This PR breaks this, I'm clueless what are the implications of this. We could suggest Would this be better or worse than the approach here? What do you guys think? |
@@ -52,7 +52,7 @@ pub fn list_archive_contents( | |||
Lzma => Box::new(xz2::read::XzDecoder::new(decoder)), | |||
Snappy => Box::new(snap::read::FrameDecoder::new(decoder)), | |||
Zstd => Box::new(zstd::stream::Decoder::new(decoder)?), | |||
Tar | Zip => unreachable!(), | |||
Tar | Zip => decoder, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like a test to make sure we don't break this in the future.
Where it asserts that:
.zip.zip.zip
.zip.zip
.zip.tar
.tar.tar.tar
.tar.tar
.tar.zip
All generate a file with the correct path name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried but I'm blocked since ouch
does not yet allow compressing into something like .zip.zip
😢
We'd have to do that first before making this test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vrmiguel it's possible
$ ouch compress README.md archive.zip
$ ouch compress archive.zip archive.zip.zip --format zip
Hopefully closes #431
See #431 (comment) for context