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

Incorrect Extension Handling #165

Closed
dtomvan opened this issue Nov 5, 2021 · 7 comments
Closed

Incorrect Extension Handling #165

dtomvan opened this issue Nov 5, 2021 · 7 comments

Comments

@dtomvan
Copy link

dtomvan commented Nov 5, 2021

Bug Report:

Test case 1:

ouch c /home/tomvd/.bashrc /home/tomvd/.bashrc.tar.bz2 && file /home/tomvd/.bashrc.tar.bz2

[INFO] Successfully compressed '/home/tomvd/.bashrc.tar.bz2'.
/home/tomvd/.bashrc.tar.bz2: gzip compressed data, original size modulo 2^32 2048
  • Observed behaviour: ouch compresses to a gzip
  • Expected behaviour: ouch compresses the file to a bzipped tarball e.g:
~> tar cf .bashrc.tar .bashrc
~> bzip2 .bashrc.tar
~> file .bashrc.tar.bz2
.bashrc.tar.bz2: bzip2 compressed data, block size = 900k

Test case 2:

ouch c /home/tomvd/.bashrc /home/tomvd/.bashrc.gz

thread 'main' panicked at 'internal error: entered unreachable code', /home/tomvd/.cargo/registry/src/github.com-1ecc6299db9ec823/ouch-0.2.0/src/commands.rs:162:18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
  • Observed behaviour: ouch panics and creates an empty .bashrc.gz
  • Expected behaviour: ouch compresses to a bzip
@dtomvan
Copy link
Author

dtomvan commented Nov 5, 2021

Oops, the second test case is #31 and will be fixed with #163.

@figsoda
Copy link
Member

figsoda commented Nov 5, 2021

actually second test case was already fixed in #89
#163 is just improving tests so we can find problems like this

@figsoda
Copy link
Member

figsoda commented Nov 5, 2021

first case seems to be fixed on master too

@dtomvan
Copy link
Author

dtomvan commented Nov 5, 2021

Oh I'm sorry, I just reported this because the version I'm on (I think from crates.io) had these bugs.

@dtomvan dtomvan closed this as completed Nov 5, 2021
@figsoda
Copy link
Member

figsoda commented Nov 5, 2021

Did you update to 0.3.1? It was delayed a little bit, but both of these should be fixed in 0.3.1

@marcospb19
Copy link
Member

I think I should create an issue template to remember people to send the ouch version they are using (nobody remembers this xD).

@marcospb19
Copy link
Member

Done, now ouch has two new templates, they don't do much, but at least has a reminder for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants