Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 May 2011 18:04:11 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r222287 - head/usr.bin/gzip
Message-ID:  <201105251804.p4PI4CBw024817@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105251804.p4PI4CBw024817>