Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Griebl <griebl@gmx.de>2002-05-16 01:45:52 +0400
committerRobert Griebl <griebl@gmx.de>2002-05-16 01:45:52 +0400
commit081df62b921cf17f1d4c4e0214abfa273c92cfde (patch)
tree6166613c821549eab4d7066c23a7e3618276d780 /archival
parent52e8d060a95877d3070c18e3bf05f3fe8854357f (diff)
Don't delete source file when decompressing to stdout
This is the normal GNU gunzip behaviour
Diffstat (limited to 'archival')
-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)
/* do the decompression, and cleanup */
if (unzip(in_file, out_file) == 0) {
/* Success, remove .gz file */
- delete_path = path;
+ if ( !(flags & gunzip_to_stdout ))
+ delete_path = path;
if (flags & gunzip_verbose) {
fprintf(stderr, "OK\n");
}