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); }