summaryrefslogtreecommitdiff
path: root/gzip.c
diff options
context:
space:
mode:
authorGlenn L McGrath2001-07-30 04:48:50 +0000
committerGlenn L McGrath2001-07-30 04:48:50 +0000
commit7499918f304554c6a0047e43b679cc481cc70eba (patch)
tree068fcf4dbd9857ceda78659ca3435d31a85f0d28 /gzip.c
parent14d7ea460fb76366a0b7ddf4e656d57e131fbf8a (diff)
downloadbusybox-7499918f304554c6a0047e43b679cc481cc70eba.zip
busybox-7499918f304554c6a0047e43b679cc481cc70eba.tar.gz
If filename is a '-' then read from stdin to stdout
Diffstat (limited to 'gzip.c')
-rw-r--r--gzip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gzip.c b/gzip.c
index cdf2268..54bb727 100644
--- a/gzip.c
+++ b/gzip.c
@@ -1246,7 +1246,7 @@ int gzip_main(int argc, char **argv)
show_usage();
}
}
- if (optind == argc) {
+ if ((optind == argc) || (strcmp(argv[optind], "-") == 0)) {
fromstdin = 1;
tostdout = 1;
}