]> Savannah Git Hosting - gnulib.git/commit
fts: handle readdir() errors
authorPádraig Brady <P@draigBrady.com>
Wed, 22 Jun 2016 12:49:53 +0000 (13:49 +0100)
committerPádraig Brady <P@draigBrady.com>
Sun, 26 Jun 2016 18:24:58 +0000 (19:24 +0100)
commit6835fc458f30b94f15d69c35a79cbc2dfabe2d06
tree7369ae8ce99e4d4d746dee727fb052949f5efdf8
parent406465c5986477fbaa8b4e33df596d9c6720a80f
fts: handle readdir() errors

* lib/fts.c (fts_build): readdir(3) returns NULL when finished,
but also upon error when it will also set errno.  Therefore
flag the error case from readdir().  We treat the case where
no items are read the same as if the dir can't be accessed,
i.e. by setting fts_errno to FTS_DNR.

The bug was initially reported by Peter Benie
http://bugzilla.opensuse.org/show_bug.cgi?id=984910
where it was mentioned that readdir() may fail
when an NFS server has a poor readdir cookie implementation.
ChangeLog
lib/fts.c