summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2011-05-25 18:04:11 +0000
committerdelphij <delphij@FreeBSD.org>2011-05-25 18:04:11 +0000
commit7d149234715415cf69abae3f5045abb55022d7a6 (patch)
treebfa81a3cad10fdf9c343ddf69d148626e39a2718 /usr.bin
parent2628ba45f75ea1644b5781feb23dcc6c2db89f9a (diff)
downloadFreeBSD-src-7d149234715415cf69abae3f5045abb55022d7a6.zip
FreeBSD-src-7d149234715415cf69abae3f5045abb55022d7a6.tar.gz
Fix a regression introduced with previous changeset: if output is stdout,
do not check for symbolic link.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/gzip/gzip.c3
1 files changed, 2 insertions, 1 deletions
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 <path>.gz if we're decompressing */
if (dflag && s == NULL && errno == ENOENT) {
len = strlen(path);
OpenPOWER on IntegriCloud