fixed cache system for percentage encoded file in single-file mode
This commit is contained in:
parent
28293b5ccd
commit
720db5aafa
|
@ -670,9 +670,7 @@ int Cache_create(const char *path)
|
||||||
Link *this_link = path_to_Link(path);
|
Link *this_link = path_to_Link(path);
|
||||||
|
|
||||||
char *fn = "__UNINITIALISED__";
|
char *fn = "__UNINITIALISED__";
|
||||||
/*
|
|
||||||
* TODO: Warning: curl_easy_unescape breaks cache creation
|
|
||||||
*/
|
|
||||||
if (CONFIG.mode == NORMAL) {
|
if (CONFIG.mode == NORMAL) {
|
||||||
fn = curl_easy_unescape(NULL,
|
fn = curl_easy_unescape(NULL,
|
||||||
this_link->f_url + ROOT_LINK_OFFSET, 0,
|
this_link->f_url + ROOT_LINK_OFFSET, 0,
|
||||||
|
|
|
@ -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.
|
* 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) {
|
if (!fi->fh) {
|
||||||
lprintf(fatal, "Cache file creation failure for %s.\n", path);
|
lprintf(fatal, "Cache file creation failure for %s.\n", path);
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
|
|
|
@ -263,7 +263,8 @@ static void LinkTable_uninitialised_fill(LinkTable *linktbl)
|
||||||
*/
|
*/
|
||||||
static LinkTable *single_LinkTable_new(const char *url)
|
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);
|
LinkTable *linktbl = LinkTable_alloc(url);
|
||||||
Link *link = Link_new(ptr, LINK_UNINITIALISED_FILE);
|
Link *link = Link_new(ptr, LINK_UNINITIALISED_FILE);
|
||||||
strncpy(link->f_url, url, MAX_FILENAME_LEN);
|
strncpy(link->f_url, url, MAX_FILENAME_LEN);
|
||||||
|
|
Loading…
Reference in New Issue