aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorOmar Rizwan <omar.rizwan@gmail.com>2019-02-28 01:05:28 -0800
committerOmar Rizwan <omar.rizwan@gmail.com>2019-02-28 01:05:28 -0800
commita3f25d346f5b17bfbfbac13265812f3360e9fe45 (patch)
tree28c5c30e07ea853f5c008b74683bbf4516439683 /fs
parentb18fc10e1420cdb32068b4452e9c1e5d9fa7024d (diff)
Add tabs/by-title. Fix symlink stuff to make it work?
FUSE readlink needing to return 0 + getattr needing to return correct st_size was _not_ obvious, lol.
Diffstat (limited to 'fs')
-rw-r--r--fs/tabfs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/tabfs.c b/fs/tabfs.c
index 0447387..7a02e83 100644
--- a/fs/tabfs.c
+++ b/fs/tabfs.c
@@ -85,12 +85,12 @@ static int tabfs_readlink(const char *path, char *buf, size_t size) {
cJSON *resp_buf_item = cJSON_GetObjectItemCaseSensitive(resp, "buf");
// FIXME: fix
char *resp_buf = cJSON_GetStringValue(resp_buf_item);
- size_t resp_buf_len = strlen(resp_buf);
- size = resp_buf_len < size ? resp_buf_len : size;
+ size_t resp_buf_size = strlen(resp_buf) + 1;
+ size = resp_buf_size < size ? resp_buf_size : size;
memcpy(buf, resp_buf, size);
- ret = size;
+ ret = 0;
});
}