Fix a regression introduced with previous changeset: if output is stdout,

do not check for symbolic link.
This commit is contained in:
Xin LI 2011-05-25 18:04:11 +00:00
parent a6d11f7139
commit 5106ce89d0

View File

@ -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);