diff options
author | delphij <delphij@FreeBSD.org> | 2011-05-25 18:04:11 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2011-05-25 18:04:11 +0000 |
commit | 7d149234715415cf69abae3f5045abb55022d7a6 (patch) | |
tree | bfa81a3cad10fdf9c343ddf69d148626e39a2718 /usr.bin/gzip | |
parent | 2628ba45f75ea1644b5781feb23dcc6c2db89f9a (diff) | |
download | FreeBSD-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/gzip')
-rw-r--r-- | usr.bin/gzip/gzip.c | 3 |
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); |