summaryrefslogtreecommitdiff
path: root/content/fetchcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'content/fetchcache.c')
-rw-r--r--content/fetchcache.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/content/fetchcache.c b/content/fetchcache.c
index eb47f332a..7153c629b 100644
--- a/content/fetchcache.c
+++ b/content/fetchcache.c
@@ -86,17 +86,13 @@ struct content * fetchcache(const char *url,
strncasecmp(url, "file:/", 6) == 0) {
/* Manipulate file URLs into correct format */
if (strncasecmp(url, "file://", 7) == 0) {
- /* file://host/... */
- char *slash = 0;
-
+ /* file://path */
url1 = malloc(7 + strlen(url));
if (!url1)
return NULL;
strcpy(url1, "file://");
- slash = strchr(url + 7, '/');
- if (slash)
- strcat(url1 + 7, slash);
+ strcat(url1 + 7, url + 6);
} else {
/* file:/... */
url1 = malloc(7 + strlen(url));