From a66cce670c39f513565011e93e7865c44806b501 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Tue, 13 Mar 2007 03:06:05 +0000 Subject: [PATCH] Fixed the ability to download files with spaces in the name --- webcit/downloads.c | 4 +++- webcit/webcit.c | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) 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 */ -- 2.30.2