Commit 55e4f9a3 authored by Jim Meyering's avatar Jim Meyering

* fts-cycle.c (leave_dir): When "leaving" a top level directory due

to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
parent 4c399534
2006-10-09 Jim Meyering <jim@meyering.net>
* fts-cycle.c (leave_dir): When "leaving" a top level directory due
to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
2006-10-09 Jim Meyering <jim@meyering.net>
* lchown.c: Include <sys/stat.h> before "stat-macros.h".
......
......@@ -140,7 +140,7 @@ leave_dir (FTS *fts, FTSENT *ent)
else
{
FTSENT *parent = ent->fts_parent;
if (parent != NULL)
if (parent != NULL && 0 <= parent->fts_level)
CYCLE_CHECK_REFLECT_CHDIR_UP (fts->fts_cycle.state,
*(parent->fts_statp), *st);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment