From 5d99ab2ff825014e070a4eb8a8c973881295aa80 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Mon, 6 Oct 2003 16:29:27 +0000 Subject: [project @ 2003-10-06 16:29:27 by jmb] use whole leafname for now svn path=/import/netsurf/; revision=346 --- riscos/download.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'riscos/download.c') diff --git a/riscos/download.c b/riscos/download.c index da15bb51e..100b28eda 100644 --- a/riscos/download.c +++ b/riscos/download.c @@ -110,6 +110,7 @@ void ro_gui_download_leaf(const char *url, char *leaf) { char *slash; size_t len; + int i; /* take url from last / to first non-RISC OS character, eg. '.' */ slash = strrchr(url, '/'); @@ -117,12 +118,19 @@ void ro_gui_download_leaf(const char *url, char *leaf) strcpy(leaf, "download"); return; } - len = strspn(slash + 1, "0123456789" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - "abcdefghijklmnopqrstuvwxyz"); /* over-paranoid */ + /*len = strspn(slash + 1, "0123456789" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "abcdefghijklmnopqrstuvwxyz");*/ /* over-paranoid */ + len = strlen(slash+1); if (40 < len) len = 40; strncpy(leaf, slash + 1, len); leaf[len] = 0; + /* swap "." for "/" */ + for (i=0; i!=len; i++) { + if (leaf[i] == '.') { + leaf[i] = '/'; + } + } } -- cgit v1.2.3