Mon 10 Aug 2009 04:41:05 PM UTC, comment #1:
Two corrections first:
> I find that an assertion "state.have_type" had been changed
> into "state.type != 0" which sounds like the exact opposite
> of the original assumption.
The former had been "!state.have_type".
> FTS_NSOK (indicating an omitted stat due to ),
... due to it not being requested in the first place.
I also had a look at behaviour in acb82fe4^ = cd123070:
$ find foo
foo
find: `foo': Permission denied
The (in my opinion better) error message comes from the FTS_ERR handler in consider_visiting. This error message doesn't even change with acb82fe4 itself, but only later in 214320ca when FTS_CWDFD got activated. Makes sense, as the old implementation would have chdir'ed into a non-existing directory.
There is an error handling block for ent->fts_info == FTS_NS, but it doesn't emit any message if ent->fts_level != 0 and no symlink loop is deteced. Adding yet another error message should be easy, and I can't see why that isn't done already.
BTW: symlink_loop got broken by FTS_CWDFD as well, will report a separate bug for this.
Notice that bug #25294 comment #0 by Eric Blake probably holds for this issue here as well: there seems to be no spec saying anything about ent->fts_statp in the FTS_NS and FTS_NSOK case. I assume that the gnulib implementation has some concept here, but it should be documented before other projects rely on it, I think.
|