aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277>2002-03-22 22:55:51 +0000
committerkraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277>2002-03-22 22:55:51 +0000
commit578e662918f44dbf45ff3e898a9983c3361fee2b (patch)
tree40b1e6069033f779a6d252b467c994d61f85e2f4
parent1fb926c0ca05fdeb96792504bc69b9a906e07115 (diff)
downloadbusybox-w32-578e662918f44dbf45ff3e898a9983c3361fee2b.tar.gz
busybox-w32-578e662918f44dbf45ff3e898a9983c3361fee2b.tar.bz2
busybox-w32-578e662918f44dbf45ff3e898a9983c3361fee2b.zip
* archival/gzip.c (gzip_main): Ensure that the output is a terminal and use
error_msg to display the error message. git-svn-id: svn://busybox.net/trunk/busybox@4479 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--archival/gzip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/archival/gzip.c b/archival/gzip.c
index fed93907b..44b5fe386 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -1312,8 +1312,8 @@ int gzip_main(int argc, char **argv)
1312 outFileNum = STDOUT_FILENO; 1312 outFileNum = STDOUT_FILENO;
1313 } 1313 }
1314 1314
1315 if (path == NULL && force == 0) { 1315 if (path == NULL && isatty(outFileNum) && force == 0) {
1316 perror_msg("compressed data not written to a terminal. Use -f to force compression."); 1316 error_msg("compressed data not written to a terminal. Use -f to force compression.");
1317 free(path); 1317 free(path);
1318 continue; 1318 continue;
1319 } 1319 }