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

Delete bz2 file when compression fails #15

Closed
nemobis opened this issue Jun 20, 2016 · 1 comment
Closed

Delete bz2 file when compression fails #15

nemobis opened this issue Jun 20, 2016 · 1 comment

Comments

@nemobis
Copy link

nemobis commented Jun 20, 2016

Using 2.3, when #14 happens, the bz2 file is not deleted:

$ lbzip2 beic-010.10.tar
lbzip2: skipping "beic-010.10.tar": open("beic-010.10.tar.bz2"): File exists
$ ls -lh beic-010.10*
-rw-rw-r-- 1 fondazione fondazione 4,1G giu 20 11:22 beic-010.10.tar
-rw------- 1 fondazione fondazione  25M giu 20 11:38 beic-010.10.tar.bz2
@kjn
Copy link
Owner

kjn commented Jun 22, 2016

Thank you for the report, but I'm afraid that this won't be fixed.

Once started, compression can fail due to several different reasons - normal and abnormal. Normal reasons include I/O error, out of disk space, insufficient memory etc. In all these cases output file should be removed upon exit, as expected.

However assertion error (such as #14) means a bug in the code. When such abnormal condition occurs, the program is aborted immediately without any cleanup and core is dumped to allow debugging. This is by design and it won't be changed. The right thing is fixing the original bug, not working it around.

@kjn kjn closed this as completed Jun 22, 2016
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

2 participants