mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
Used add_shell_quoted_to_string instead of enclosing the text with '"'.
The code works both with copiousoutput and without it.
This commit is contained in:
parent
65d7faed61
commit
c25c41bd18
@ -810,9 +810,7 @@ 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_shell_quoted_to_string(&name, file, strlen(file));
|
||||||
add_to_string(&name, file);
|
|
||||||
add_char_to_string(&name, '"');
|
|
||||||
#endif
|
#endif
|
||||||
prog++;
|
prog++;
|
||||||
}
|
}
|
||||||
@ -823,9 +821,8 @@ subst_file(unsigned char *prog, unsigned char *file)
|
|||||||
|
|
||||||
if (init_string(&s)) {
|
if (init_string(&s)) {
|
||||||
add_to_string(&s, "/bin/cat ");
|
add_to_string(&s, "/bin/cat ");
|
||||||
add_char_to_string(&s, '"');
|
add_shell_quoted_to_string(&s, file, strlen(file));
|
||||||
add_to_string(&s, file);
|
add_to_string(&s, " | ");
|
||||||
add_to_string(&s, "\" | ");
|
|
||||||
add_string_to_string(&s, &name);
|
add_string_to_string(&s, &name);
|
||||||
done_string(&name);
|
done_string(&name);
|
||||||
return s.source;
|
return s.source;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user