From 469481b2725cd08a51a81ac344fd90749fea109c Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Wed, 21 Feb 2007 10:37:51 +0100 Subject: [PATCH] Decode %20 in local filenames and enclose them with '"'. Local files with spaces in filenames wasn't handled properly by MIME handler. --- src/session/download.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/session/download.c b/src/session/download.c index ee9917024..1ca48698d 100644 --- a/src/session/download.c +++ b/src/session/download.c @@ -800,7 +800,9 @@ subst_file(unsigned char *prog, unsigned char *file) cygwin_conv_to_full_win32_path(file, new_path); add_to_string(&name, new_path); #else + add_char_to_string(&name, '"'); add_to_string(&name, file); + add_char_to_string(&name, '"'); #endif prog++; } @@ -1068,6 +1070,7 @@ tp_open(struct type_query *type_query) unsigned char *handler = NULL; if (file) { + decode_uri(file); handler = subst_file(type_query->external_handler, file); mem_free(file); }