diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2022-10-08 21:28:15 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2022-11-09 14:28:41 +0200 |
commit | 3176f992c55b8d788c4633809aaf9447376a5a12 (patch) | |
tree | a08fb57cecafafb4d41bd1b2df3007d61aff513d /src/xz/args.c | |
parent | liblzma: Add .lz support to lzma_auto_decoder(). (diff) | |
download | xz-3176f992c55b8d788c4633809aaf9447376a5a12.tar.xz |
xz: Add .lz (lzip) decompression support.
If configured with --disable-lzip-decoder then --long-help will
still list `lzip' in --format but I left it like that since
due to translations it would be messy to have two help strings.
Features are disabled only in special situations so wrong help
in such a situation shouldn't matter much.
Thanks to Michał Górny for the original patch.
Diffstat (limited to 'src/xz/args.c')
-rw-r--r-- | src/xz/args.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/xz/args.c b/src/xz/args.c index 941214b5..2af39098 100644 --- a/src/xz/args.c +++ b/src/xz/args.c @@ -412,6 +412,9 @@ parse_real(args_info *args, int argc, char **argv) { "xz", FORMAT_XZ }, { "lzma", FORMAT_LZMA }, { "alone", FORMAT_LZMA }, +#ifdef HAVE_LZIP_DECODER + { "lzip", FORMAT_LZIP }, +#endif // { "gzip", FORMAT_GZIP }, // { "gz", FORMAT_GZIP }, { "raw", FORMAT_RAW }, @@ -668,6 +671,12 @@ args_parse(args_info *args, int argc, char **argv) "at build time")); #endif +#ifdef HAVE_LZIP_DECODER + if (opt_mode == MODE_COMPRESS && opt_format == FORMAT_LZIP) + message_fatal(_("Compression of lzip files (.lz) " + "is not supported")); +#endif + // Never remove the source file when the destination is not on disk. // In test mode the data is written nowhere, but setting opt_stdout // will make the rest of the code behave well. |