diff --git a/src/cache.c b/src/cache.c index 37e7510..f889373 100644 --- a/src/cache.c +++ b/src/cache.c @@ -670,9 +670,7 @@ int Cache_create(const char *path) Link *this_link = path_to_Link(path); char *fn = "__UNINITIALISED__"; - /* - * TODO: Warning: curl_easy_unescape breaks cache creation - */ + if (CONFIG.mode == NORMAL) { fn = curl_easy_unescape(NULL, this_link->f_url + ROOT_LINK_OFFSET, 0, diff --git a/src/fuse_local.c b/src/fuse_local.c index 8d2894e..9b18c2f 100644 --- a/src/fuse_local.c +++ b/src/fuse_local.c @@ -116,10 +116,6 @@ static int fs_open(const char *path, struct fuse_file_info *fi) /* * The cache definitely cannot be opened for some reason. */ - /* - * TODO: This appears to be broken when the file needs to be - * percentage encoded - */ if (!fi->fh) { lprintf(fatal, "Cache file creation failure for %s.\n", path); return -ENOENT; diff --git a/src/link.c b/src/link.c index 72e03c4..5f0910c 100644 --- a/src/link.c +++ b/src/link.c @@ -263,7 +263,8 @@ static void LinkTable_uninitialised_fill(LinkTable *linktbl) */ static LinkTable *single_LinkTable_new(const char *url) { - char *ptr = strrchr(url, '/') + 1; + char *orig_ptr = strrchr(url, '/') + 1; + char *ptr = curl_easy_unescape(NULL, orig_ptr, 0, NULL); LinkTable *linktbl = LinkTable_alloc(url); Link *link = Link_new(ptr, LINK_UNINITIALISED_FILE); strncpy(link->f_url, url, MAX_FILENAME_LEN);