From 592a3e63ee06604eb27a888ffb03a0ff3dbf5cf0 Mon Sep 17 00:00:00 2001 From: Matt Kraai Date: Tue, 5 Feb 2002 19:34:53 +0000 Subject: [PATCH] * archival/gzip.c (gzip_main): Display usage if given multiple files. --- archival/gzip.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/archival/gzip.c b/archival/gzip.c index 436393ed5..732a83e90 100644 --- a/archival/gzip.c +++ b/archival/gzip.c @@ -1246,6 +1246,9 @@ int gzip_main(int argc, char **argv) tostdout = 1; } + if (argc - optind > 1) + show_usage (); + if (isatty(fileno(stdout)) && tostdout==1 && force==0) error_msg_and_die( "compressed data not written to terminal. Use -f to force it."); -- 2.25.1