diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/dirtree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dirtree.c b/lib/dirtree.c index c5cf654a..e44df66c 100644 --- a/lib/dirtree.c +++ b/lib/dirtree.c @@ -36,7 +36,7 @@ struct dirtree *dirtree_add_node(struct dirtree *parent, char *name, int flags) int fd = parent ? parent->dirfd : AT_FDCWD; if (fstatat(fd, name, &st,AT_SYMLINK_NOFOLLOW*!(flags&DIRTREE_SYMFOLLOW))) { - if (flags&DIRTREE_STATLESS) statless++; + if ((flags&DIRTREE_STATLESS) && errno == ENOENT) statless++; else goto error; } if (S_ISLNK(st.st_mode)) { |