Commit 7531f418 authored by Nicolas Valcárcel's avatar Nicolas Valcárcel Committed by Colin Watson

Adjust scp quoting in verbose mode

Tweak scp's reporting of filenames in verbose mode to be a bit less
confusing with spaces.

This should be revised to mimic real shell quoting.

Bug-Ubuntu: https://bugs.launchpad.net/bugs/89945
Last-Update: 2010-02-27

Patch-Name: scp-quoting.patch
parent 7016a7e8
......@@ -189,8 +189,16 @@ do_local_cmd(arglist *a)
if (verbose_mode) {
fprintf(stderr, "Executing:");
for (i = 0; i < a->num; i++)
fprintf(stderr, " %s", a->list[i]);
for (i = 0; i < a->num; i++) {
if (i == 0)
fprintf(stderr, " %s", a->list[i]);
else
/*
* TODO: misbehaves if a->list[i] contains a
* single quote
*/
fprintf(stderr, " '%s'", a->list[i]);
}
fprintf(stderr, "\n");
}
if ((pid = fork()) == -1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment