On 22/07/2026 22:34, Paul Eggert wrote:
On 2026-07-22 12:51, Pádraig Brady wrote:
+static inline bool
+ignorable_traversal_errno (int errnum)
+{
+  return errnum == ENOENT || errnum == ENOTDIR;
+}
+

I understand the ENOENT, but why the ENOTDIR? ENOTDIR says something
more serious happened than a mere removal while we traversed.
I wasn't 100% sure about that TBH.
I was thinking that ENOTDIR => a dir was replaced with a non dir,
which would be another case of something changing underneath us
in the traversed hierarchy that wasn't necessarily an error,
and thus something we should ignore.
It definitely deserves a comment at least.

Note ENOTDIR is one of the considerations in
nonexistent_file_errno() in src/remove.c.
EILSEQ and EINVAL were also considered there,
though I don't think they're appropriate to ignore
for entries determined from the hierarchy.

cheers,
Padraig




Reply via email to