aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsandman <sandman@69ca8d6d-28ef-0310-b511-8ec308f3f277>2002-05-15 21:45:52 +0000
committersandman <sandman@69ca8d6d-28ef-0310-b511-8ec308f3f277>2002-05-15 21:45:52 +0000
commit1a22aaa53079384ab01c4640ed150510489b7e4f (patch)
tree6166613c821549eab4d7066c23a7e3618276d780
parent0ce22e75306720ef27be9fb7b3bbb8ad796fcd94 (diff)
downloadbusybox-w32-1a22aaa53079384ab01c4640ed150510489b7e4f.tar.gz
busybox-w32-1a22aaa53079384ab01c4640ed150510489b7e4f.tar.bz2
busybox-w32-1a22aaa53079384ab01c4640ed150510489b7e4f.zip
Don't delete source file when decompressing to stdout
This is the normal GNU gunzip behaviour git-svn-id: svn://busybox.net/trunk/busybox@4776 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--archival/gunzip.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/archival/gunzip.c b/archival/gunzip.c
index e47dd3f83..032b43c2c 100644
--- a/archival/gunzip.c
+++ b/archival/gunzip.c
@@ -132,7 +132,8 @@ static int gunzip_file (const char *path, int flags)
132 /* do the decompression, and cleanup */ 132 /* do the decompression, and cleanup */
133 if (unzip(in_file, out_file) == 0) { 133 if (unzip(in_file, out_file) == 0) {
134 /* Success, remove .gz file */ 134 /* Success, remove .gz file */
135 delete_path = path; 135 if ( !(flags & gunzip_to_stdout ))
136 delete_path = path;
136 if (flags & gunzip_verbose) { 137 if (flags & gunzip_verbose) {
137 fprintf(stderr, "OK\n"); 138 fprintf(stderr, "OK\n");
138 } 139 }