fts: correct internal computation of nlinks (optimization-related)
authorJim Meyering <meyering@redhat.com>
Wed, 11 Feb 2009 10:13:11 +0000 (11:13 +0100)
committerJim Meyering <meyering@redhat.com>
Wed, 11 Feb 2009 18:24:28 +0000 (19:24 +0100)
* 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
lib/fts.c

index 39f4533..1bf44d1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-02-11  Jim Meyering  <meyering@redhat.com>
+
+       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  <bruno@clisp.org>
 
        Tests for module 'uniwbrk/ulc-wordbreaks'.
index 836c179..017ccd5 100644 (file)
--- 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);