mirror of
https://github.com/rkd77/elinks.git
synced 2025-04-18 00:47:36 -04:00
Decode %20 in local filenames and enclose them with '"'.
Local files with spaces in filenames wasn't handled properly by MIME handler.
This commit is contained in:
parent
21fd1fd10f
commit
469481b272
@ -800,7 +800,9 @@ subst_file(unsigned char *prog, unsigned char *file)
|
|||||||
cygwin_conv_to_full_win32_path(file, new_path);
|
cygwin_conv_to_full_win32_path(file, new_path);
|
||||||
add_to_string(&name, new_path);
|
add_to_string(&name, new_path);
|
||||||
#else
|
#else
|
||||||
|
add_char_to_string(&name, '"');
|
||||||
add_to_string(&name, file);
|
add_to_string(&name, file);
|
||||||
|
add_char_to_string(&name, '"');
|
||||||
#endif
|
#endif
|
||||||
prog++;
|
prog++;
|
||||||
}
|
}
|
||||||
@ -1068,6 +1070,7 @@ tp_open(struct type_query *type_query)
|
|||||||
unsigned char *handler = NULL;
|
unsigned char *handler = NULL;
|
||||||
|
|
||||||
if (file) {
|
if (file) {
|
||||||
|
decode_uri(file);
|
||||||
handler = subst_file(type_query->external_handler, file);
|
handler = subst_file(type_query->external_handler, file);
|
||||||
mem_free(file);
|
mem_free(file);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user