diff options
author | Kyle J Harper <KyleJHarper@gmail.com> | 2015-04-12 23:41:55 (GMT) |
---|---|---|
committer | Kyle J Harper <KyleJHarper@gmail.com> | 2015-04-12 23:41:55 (GMT) |
commit | 7f2f1fcd5541976e79026ba00465f54b41ae29c2 (patch) | |
tree | 573085747ba439db95faa5ecfabd6f82f25b70e8 /programs/lz4cli.c | |
parent | 0169502b49dfa5eb8878f5c85be3270012266fc3 (diff) | |
download | lz4-7f2f1fcd5541976e79026ba00465f54b41ae29c2.zip lz4-7f2f1fcd5541976e79026ba00465f54b41ae29c2.tar.gz lz4-7f2f1fcd5541976e79026ba00465f54b41ae29c2.tar.bz2 |
Added support for continuation of file compression and decompression if input files are missing. Should more closely match gzip/bzip2/xz and so forth. Also removed a debug print accidentally left in.
Diffstat (limited to 'programs/lz4cli.c')
-rw-r--r-- | programs/lz4cli.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/programs/lz4cli.c b/programs/lz4cli.c index f7cf27e..f3524b3 100644 --- a/programs/lz4cli.c +++ b/programs/lz4cli.c @@ -265,7 +265,8 @@ int main(int argc, char** argv) forceStdout=0, forceCompress=0, main_pause=0, - multiple_inputs=0; + multiple_inputs=0, + multiple_rv=0; const char* input_filename=0; const char* output_filename=0; char* dynNameSpace=0; @@ -518,7 +519,7 @@ int main(int argc, char** argv) if (decode) { if (multiple_inputs) - LZ4IO_decompressMultipleFilenames(inFileNames, ifnIdx, LZ4_EXTENSION); + multiple_rv = LZ4IO_decompressMultipleFilenames(inFileNames, ifnIdx, LZ4_EXTENSION); else DEFAULT_DECOMPRESSOR(input_filename, output_filename); } @@ -533,7 +534,7 @@ int main(int argc, char** argv) else { if (multiple_inputs) - LZ4IO_compressMultipleFilenames(inFileNames, ifnIdx, LZ4_EXTENSION, cLevel); + multiple_rv = LZ4IO_compressMultipleFilenames(inFileNames, ifnIdx, LZ4_EXTENSION, cLevel); else DEFAULT_COMPRESSOR(input_filename, output_filename, cLevel); } @@ -542,5 +543,6 @@ int main(int argc, char** argv) if (main_pause) waitEnter(); free(dynNameSpace); free((void*)inFileNames); + if (multiple_rv != 0) return multiple_rv; return 0; } |