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

Compressing a .tar file causes (maybe) undesirable double-wrapping #668

Open
cyqsimon opened this issue May 13, 2024 · 0 comments
Open

Compressing a .tar file causes (maybe) undesirable double-wrapping #668

cyqsimon opened this issue May 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@cyqsimon
Copy link
Contributor

cyqsimon commented May 13, 2024

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:

  1. There is only one input file.
  2. The input file has extension .tar.
  3. 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.

@cyqsimon cyqsimon added the bug Something isn't working label May 13, 2024
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

No branches or pull requests

1 participant