From 7d149234715415cf69abae3f5045abb55022d7a6 Mon Sep 17 00:00:00 2001 From: delphij Date: Wed, 25 May 2011 18:04:11 +0000 Subject: Fix a regression introduced with previous changeset: if output is stdout, do not check for symbolic link. --- usr.bin/gzip/gzip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'usr.bin') diff --git a/usr.bin/gzip/gzip.c b/usr.bin/gzip/gzip.c index 927493e..217660e 100644 --- a/usr.bin/gzip/gzip.c +++ b/usr.bin/gzip/gzip.c @@ -1782,7 +1782,8 @@ handle_pathname(char *path) } retry: - if (stat(path, &sb) != 0 || (fflag == 0 && lstat(path, &sb) != 0)) { + if (stat(path, &sb) != 0 || (fflag == 0 && cflag == 0 && + lstat(path, &sb) != 0)) { /* lets try .gz if we're decompressing */ if (dflag && s == NULL && errno == ENOENT) { len = strlen(path); -- cgit v1.1