Compressing a `.tar` file causes (maybe) undesirable double-wrapping
Opened this issue · 0 comments
cyqsimon commented
Version
0.5.1
Description
When trying to compress a file that is already a .tar
file using a command like so: ouch c foo.tar foo.tar.zst
, the result is a foo.tar.zst
that contains a foo.tar
, which contains the contents. This behaviour is not customisable and possibly undesirable - the user may want (as I did) a foo.tar.zst
that directly contains the contents of foo.tar
.
I think it would be better to prompt the user and/or add a flag to allow the user to specify what to do. The prompt would trigger when all three conditions are met:
- There is only one input file.
- The input file has extension
.tar
. - The selected output format is
*.tar.*
.
I would like to submit a PR for this if time allows, but it may not. If anyone wants to claim this please go ahead.