bug-gnulib
[Top][All Lists]
Advanced

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

Possible spurious cycle detection with fts


From: James Youngman
Subject: Possible spurious cycle detection with fts
Date: Mon, 8 Aug 2005 22:32:05 +0100
User-agent: Mutt/1.5.9i

Hello,

I'm still investigating this problem, but I'm seeing some odd
behaviour with fts().  I have a directory layout like this:-

$ find find1 -ls
1299693    4 drwxr-xr-x   3 james    users        4096 Aug  8 20:33 find1
1299705    4 drwxr-xr-x   2 james    users        4096 Aug  8 20:33 find1/dir1
1299729    0 lrwxrwxrwx   1 james    users           4 Aug  8 20:33 
find1/symlink_to_dir1 -> dir1

If I invoke fts_open() with the FTS_LOGICAL flag and do not set
FTS_TIGHT_CYCLE_CHECK, then fts_read() returns FTS_DC in
ent->fts_info.  However, with the same directory layout FTS_DC is not
set if FTS_TIGHT_CYCLE_CHECK is set.

fts_options                                     Result
FTS_NOSTAT|FTS_LOGICAL|FTS_TIGHT_CYCLE_CHECK    OK
FTS_NOSTAT|FTS_LOGICAL                          Loop (wrongly) detected
FTS_NOSTAT|FTS_PHYSICAL                         OK

This means that I suspect that there may be a problem with
cycle_check() in this case, as called from fts-cycle.c.  I have not
fully investigated the problem yet, so I am not sure if there really
is a problem.

I have noticed in particular that leave_dir() in fts-cycle.c does
nothing if FTS_TIGHT_CYCLE_CHECK is not set.  Perhaps that is related
to this problem.

Regards,
James.




reply via email to

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