mirror of
https://git.sr.ht/~cismonx/bookmarkfs
synced 2025-06-07 19:58:50 +00:00
fs_ops: fix opendir for keyword directory
This commit is contained in:
parent
c1cf9db2a1
commit
6fb9438d3c
1 changed files with 9 additions and 9 deletions
18
src/fs_ops.c
18
src/fs_ops.c
|
@ -1532,25 +1532,25 @@ intfs_opendir (
|
||||||
fuse_ino_t ino,
|
fuse_ino_t ino,
|
||||||
struct fuse_file_info *fi
|
struct fuse_file_info *fi
|
||||||
) {
|
) {
|
||||||
int status = 0;
|
uint64_t bm_id = BOOKMARKS_ROOT_ID;
|
||||||
|
|
||||||
uint32_t flags = 0;
|
uint32_t flags = 0;
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case INTFS_ID_ROOT:
|
case INTFS_ID_ROOT:
|
||||||
fi->cache_readdir = 1;
|
fi->cache_readdir = 1;
|
||||||
fi->keep_cache = 1;
|
fi->keep_cache = 1;
|
||||||
break;
|
return 0;
|
||||||
|
|
||||||
case INTFS_ID_BOOKMARKS:
|
|
||||||
status = bm_opendir(BOOKMARKS_ROOT_ID, ino, flags, fi);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case INTFS_ID_TAGS:
|
case INTFS_ID_TAGS:
|
||||||
flags |= BOOKMARKFS_BOOKMARK_TYPE(TAG);
|
flags |= BOOKMARKFS_BOOKMARK_TYPE(TAG);
|
||||||
status = bm_opendir(TAGS_ROOT_ID, ino, flags, fi);
|
bm_id = TAGS_ROOT_ID;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case INTFS_ID_KEYWORDS:
|
||||||
|
flags |= BOOKMARKFS_BOOKMARK_TYPE(KEYWORD);
|
||||||
|
bm_id = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return status;
|
return bm_opendir(bm_id, ino, flags, fi);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
Loading…
Add table
Reference in a new issue