mirror of
https://github.com/sheumann/hush.git
synced 2024-12-21 23:29:34 +00:00
* archival/bunzip2.c (bunzip2_main): Do not remove files if writing to standard
output. * testsuite/bunzip2/bzcat-does-not-remove-compressed-file: New.
This commit is contained in:
parent
744ec1d549
commit
a0782684fd
@ -2373,11 +2373,11 @@ int bunzip2_main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (uncompressStream(src_stream, dst_stream)) {
|
if (uncompressStream(src_stream, dst_stream)) {
|
||||||
if (save_name != NULL)
|
if (!(flags & bunzip_to_stdout))
|
||||||
delete_name = argv[optind];
|
delete_name = argv[optind];
|
||||||
status = EXIT_SUCCESS;
|
status = EXIT_SUCCESS;
|
||||||
} else {
|
} else {
|
||||||
if (save_name != NULL)
|
if (!(flags & bunzip_to_stdout))
|
||||||
delete_name = save_name;
|
delete_name = save_name;
|
||||||
status = EXIT_FAILURE;
|
status = EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
3
testsuite/bunzip2/bzcat-does-not-remove-compressed-file
Normal file
3
testsuite/bunzip2/bzcat-does-not-remove-compressed-file
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
echo foo | bzip2 >foo.bz2
|
||||||
|
busybox bzcat foo.bz2
|
||||||
|
test -f foo.bz2
|
Loading…
Reference in New Issue
Block a user