ouch icon indicating copy to clipboard operation
ouch copied to clipboard

Panic when incorrect partial compression is detected.

Open marcospb19 opened this issue 4 years ago • 0 comments

Version

b50987840ea7fd66f55206a6116fd7169eac8aed

Description

When this command is ran:

$ ouch --accessible c /var/cache/pacman/pkg/qt5-base-5.15.2+kde+r262-1-x86_64.pkg.tar.zst output.xz

Current Behavior

Detects partial compression and panics:

Partial compression detected. Compressing qt5-base-5.15.2+kde+r262-1-x86_64.pkg.tar.zst into output.xz
thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', src/commands.rs:329:11
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Expected Behavior

Should not panic, but after #223, maybe should also remove partial compression detection, code can be reused to give useful warnings.

Additional Information

I'll be solving this one, creating the issue just so I don't forget it.

marcospb19 avatar Dec 08 '21 21:12 marcospb19