Author: delphij
Date: Wed May 25 18:04:11 2011
New Revision: 222287
URL: http://svn.freebsd.org/changeset/base/222287

Log:
  Fix a regression introduced with previous changeset: if output is stdout,
  do not check for symbolic link.

Modified:
  head/usr.bin/gzip/gzip.c

Modified: head/usr.bin/gzip/gzip.c
==============================================================================
--- head/usr.bin/gzip/gzip.c    Wed May 25 14:13:53 2011        (r222286)
+++ head/usr.bin/gzip/gzip.c    Wed May 25 18:04:11 2011        (r222287)
@@ -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);
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to