# HG changeset patch # User Jim Meyering # Date 1234347191 -3600 # Node ID 15e1c0e6fd354d92d55f201b807d764a3f166c27 # Parent f270122900efbd3dc35dfa799c60d10c365811a7 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. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-02-11 Jim Meyering + + 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 Tests for module 'uniwbrk/ulc-wordbreaks'. diff --git a/lib/fts.c b/lib/fts.c --- a/lib/fts.c +++ b/lib/fts.c @@ -1286,7 +1286,7 @@ 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);