From a3f25d346f5b17bfbfbac13265812f3360e9fe45 Mon Sep 17 00:00:00 2001 From: Omar Rizwan Date: Thu, 28 Feb 2019 01:05:28 -0800 Subject: 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. --- fs/tabfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fs') 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; }); } -- cgit v1.2.3