struct fuse_direntry {
struct stat stat;
+ enum fuse_fill_dir_flags flags;
char *name;
struct fuse_direntry *next;
};
}
static int fuse_add_direntry_to_dh(struct fuse_dh *dh, const char *name,
- struct stat *st)
+ struct stat *st, enum fuse_fill_dir_flags flags)
{
struct fuse_direntry *de;
free(de);
return -1;
}
+ de->flags = flags;
de->stat = *st;
de->next = NULL;
} else {
dh->filled = 1;
- if (fuse_add_direntry_to_dh(dh, name, &stbuf) == -1)
+ if (fuse_add_direntry_to_dh(dh, name, &stbuf, flags) == -1)
return 1;
}
return 0;
} else {
dh->filled = 1;
- if (fuse_add_direntry_to_dh(dh, name, &e.attr) == -1)
+ if (fuse_add_direntry_to_dh(dh, name, &e.attr, flags) == -1)
return 1;
}
.attr = de->stat,
};
- if (!is_dot_or_dotdot(de->name)) {
+ if (de->flags & FUSE_FILL_DIR_PLUS &&
+ !is_dot_or_dotdot(de->name)) {
res = do_lookup(dh->fuse, dh->nodeid,
de->name, &e);
if (res) {