Command line extraction exit code false negative
A free file archiver for extremely high compression
Brought to you by:
ipavlov
An operation resulting in a successful extraction, even when a minor error is present, should return an exit code of WARNING (1), not a FATAL ERROR (2). Otherwise, it is not possible for the caller to know whether the operation completed successfully despite the error/warning.
For example, incorrectly give a .tar file a .bz2 extension, then extract it via the command line (without specifying the type). 7zG successfully detects that the file is a .tar file, gives a warning message that it could not open the file as a .bz2 file, then successfully extracts the files from the archive. The return value, however, is "2", the same as if the file was corrupt and unextractable.
That code is complicated.
Probably later I'll try to look it.