bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] fts: correct internal computation of nlinks (optimization-relate


From: Jim Meyering
Subject: [PATCH] fts: correct internal computation of nlinks (optimization-related)
Date: Wed, 11 Feb 2009 19:27:33 +0100

FYI, while looking at the problem with du -X vs. fuse and stat'ing
an excluded directory, I noticed a bogus conjunct.  The patch below
removes it:

>From 66216f4811a8d82810e88371c64214191b31e244 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Wed, 11 Feb 2009 11:13:11 +0100
Subject: [PATCH] fts: correct internal computation of nlinks 
(optimization-related)

* lib/fts.c (fts_build): ISSET(FTS_NOSTAT) has no bearing on
whether the current entry is a directory, so don't test it.
---
 ChangeLog |    6 ++++++
 lib/fts.c |    2 +-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 39f4533..1bf44d1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-02-11  Jim Meyering  <address@hidden>
+
+       fts: correct internal computation of nlinks (optimization-related)
+       * lib/fts.c (fts_build): ISSET(FTS_NOSTAT) has no bearing on
+       whether the current entry is a directory, so don't test it.
+
 2009-02-10  Bruno Haible  <address@hidden>

        Tests for module 'uniwbrk/ulc-wordbreaks'.
diff --git a/lib/fts.c b/lib/fts.c
index 836c179..017ccd5 100644
--- a/lib/fts.c
+++ b/lib/fts.c
@@ -1286,7 +1286,7 @@ mem1:                             saved_errno = errno;
                           to caller, when possible.  */
                        set_stat_type (p->fts_statp, D_TYPE (dp));
                        fts_set_stat_required(p, !skip_stat);
-                       is_dir = (ISSET(FTS_PHYSICAL) && ISSET(FTS_NOSTAT)
+                       is_dir = (ISSET(FTS_PHYSICAL)
                                  && DT_MUST_BE(dp, DT_DIR));
                } else {
                        p->fts_info = fts_stat(sp, p, false);
--
1.6.2.rc0.35.g1b53




reply via email to

[Prev in Thread] Current Thread [Next in Thread]