summaryrefslogtreecommitdiff
path: root/src/du.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1995-02-21 05:19:03 +0000
committerJim Meyering <jim@meyering.net>1995-02-21 05:19:03 +0000
commit875eafd4895baf158e376508b84832e6c047b6a8 (patch)
treea5257f0b94b35228e706c04325b7d806b469bcfd /src/du.c
parent03daea30a66372d86e43c4aeae64d646258d3e9e (diff)
downloadcoreutils-875eafd4895baf158e376508b84832e6c047b6a8.tar.xz
(count_entry): Fix bug in polarity of safe-stat status test.
Diffstat (limited to 'src/du.c')
-rw-r--r--src/du.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/du.c b/src/du.c
index 7fba843ad..b23b9acb4 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);