One of the features baked into lrzip was to allow the user to save a few keystrokes when decompressing or testing a file. If the .lrz was left out on the command line, e.g.:
lrzip -d test.tar, or
lrzip -df test.tar, or
lrzip -t test.tar
lrzip would silently add the implied .lrz extension.
With the addition of the recursive functionality, this now fails in two cases.
If the destination file exists (i.e. test.tar), and
If the destination file does not exist.
Case 1
-rw-r--r-- 1 peter users 512 May 21 15:52 test.tar
-rw-r--r-- 1 peter users 176 May 21 15:52 test.tar.lrz
lrzip -d exhibits normal behavior/tmp$ lrzip -d test.tar
Output filename is: test.tar
Failed to create test.tar
File exists
Fatal error - exiting
lrzip -df fails improperly
lrzip -df test.tar
Failed to stat test.tar
Fatal error - exiting
lrzip -t fails/tmp$ lrzip/lrzip -t test.tar
Not an lrzip file
Fatal error - exiting
Case 2
-rw-r--r-- 1 peter users 176 May 21 15:52 test.tar.lrz
/tmp$ lrzip -d test.tar
Failed to stat test.tar
Fatal error - exiting
/tmp$ lrzip -t test.tar
Failed to stat test.tar
Fatal error - exiting
The bugs occur in the recursive loop in main.c (Case 2) and in the function decompress_file in lrzip.c (Case 1).
The workaround is to decompress or test always using the .lrz extension with -lrzip -d|-df or lrzip -t. The fix is simple, but requires a bit of testing before release. Anyone with time is free to work on this too. I have some other priorities with version 0.7 right now.
One of the features baked into
lrzip
was to allow the user to save a few keystrokes when decompressing or testing a file. If the .lrz was left out on the command line, e.g.:lrzip -d test.tar
, orlrzip -df test.tar
, orlrzip -t test.tar
lrzip would silently add the implied .lrz extension.With the addition of the recursive functionality, this now fails in two cases.
Case 1 -rw-r--r-- 1 peter users 512 May 21 15:52 test.tar -rw-r--r-- 1 peter users 176 May 21 15:52 test.tar.lrz lrzip -d exhibits normal behavior
/tmp$ lrzip -d test.tar
Output filename is: test.tar Failed to create test.tar File exists Fatal error - exiting lrzip -df fails improperly lrzip -df test.tar Failed to stat test.tar Fatal error - exiting lrzip -t fails/tmp$ lrzip/lrzip -t test.tar
Not an lrzip file Fatal error - exitingCase 2 -rw-r--r-- 1 peter users 176 May 21 15:52 test.tar.lrz
/tmp$ lrzip -d test.tar
Failed to stat test.tar Fatal error - exiting/tmp$ lrzip -t test.tar
Failed to stat test.tar Fatal error - exitingThe bugs occur in the recursive loop in main.c (Case 2) and in the function decompress_file in lrzip.c (Case 1).
The workaround is to decompress or test always using the .lrz extension with -
lrzip -d|-df
orlrzip -t
. The fix is simple, but requires a bit of testing before release. Anyone with time is free to work on this too. I have some other priorities with version 0.7 right now.