From: Jim Meyering Date: Tue, 21 Feb 1995 05:19:03 +0000 (+0000) Subject: (count_entry): Fix bug in polarity of safe-stat status test. X-Git-Tag: textutils-1_12_1~289 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=875eafd4895baf158e376508b84832e6c047b6a8;p=thirdparty%2Fcoreutils.git (count_entry): Fix bug in polarity of safe-stat status test. --- diff --git a/src/du.c b/src/du.c index 7fba843ad7..b23b9acb42 100644 --- a/src/du.c +++ b/src/du.c @@ -504,7 +504,7 @@ count_entry (ent, top, last_dev) a symlink, remember the current directory so we can return to it later. In other cases, chdir ("..") works fine. */ through_symlink = (xstat == safe_stat - && safe_lstat (ent, &e_buf) + && safe_lstat (ent, &e_buf) == 0 && S_ISLNK (e_buf.st_mode)); if (through_symlink) save_cwd (&cwd);