From: Art Cancro Date: Tue, 13 Mar 2007 03:06:05 +0000 (+0000) Subject: Fixed the ability to download files with spaces in the name X-Git-Tag: v7.86~3519 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=a66cce670c39f513565011e93e7865c44806b501 Fixed the ability to download files with spaces in the name --- diff --git a/webcit/downloads.c b/webcit/downloads.c index 18a136734..d3ffe37bb 100644 --- a/webcit/downloads.c +++ b/webcit/downloads.c @@ -89,7 +89,9 @@ void download_file(char *filename) /* Setting to nonzero forces a MIME type of application/octet-stream */ int force_download = 1; - serv_printf("OPEN %s", filename); + safestrncpy(buf, filename, sizeof buf); + unescape_input(buf); + serv_printf("OPEN %s", buf); serv_getln(buf, sizeof buf); if (buf[0] == '2') { bytes = extract_long(&buf[4], 0); diff --git a/webcit/webcit.c b/webcit/webcit.c index 0c1caf746..eeed42acc 100644 --- a/webcit/webcit.c +++ b/webcit/webcit.c @@ -256,7 +256,6 @@ void escputs(char *strbuf) /** * \brief Escape a string for feeding out as a URL. - * Returns a pointer to a buffer that must be freed by the caller! * \param outbuf the output buffer * \param strbuf the input buffer */