From 875eafd4895baf158e376508b84832e6c047b6a8 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 21 Feb 1995 05:19:03 +0000 Subject: [PATCH] (count_entry): Fix bug in polarity of safe-stat status test. --- src/du.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.47.3