Follow-up Comment #12, bug #23443 (project findutils):

I've realized there's a better way to do this. When the current code detects
a loop (looking solely at dev/ino), call fstatvfs to determine the type of the
current file system, and if it's of a type that may exhibit non-POSIX
semantics, perform a more-involved test as outlined below.  Otherwise,
continue as currently done and report the cycle.

While the current cycle-checking code is efficient even for very deep trees,
once we've found a potential cycle, there's little down-side to using the
classic (inefficient-in-general) approach of examining each parent FTSENT in
succession, looking for a match.  Each FTSENT does have stat information, so
comparing other st_* members is easy and requires no additional memory.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?23443>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



Reply via email to