From 026e56d539099477043e499b1a7227c5a67e200f Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Mon, 26 Feb 2007 19:51:22 +0100 Subject: [PATCH] Used add_shell_quoted_to_string instead of enclosing the text with '"'. The code works both with copiousoutput and without it. [ Part 1/2 of commit c25c41bd18639111446bbc270466f1d8a9de329e on the witekfl branch. I'm leaving out the part that depends on commit 469481b2725cd08a51a81ac344fd90749fea109c, which is not yet safe to apply. --KON ] --- src/session/download.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/session/download.c b/src/session/download.c index da7181d8e..a928bf2dd 100644 --- a/src/session/download.c +++ b/src/session/download.c @@ -822,9 +822,8 @@ subst_file(unsigned char *prog, unsigned char *file) if (init_string(&s)) { add_to_string(&s, "/bin/cat "); - add_char_to_string(&s, '"'); - add_to_string(&s, file); - add_to_string(&s, "\" | "); + add_shell_quoted_to_string(&s, file, strlen(file)); + add_to_string(&s, " | "); add_string_to_string(&s, &name); done_string(&name); return s.source;