mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-10-21 13:24:15 -04:00
Add a colon if a non-empty pre-xfer exec message follows.
This commit is contained in:
1 parent
e3bc529de9
commit
d80f7d6cc3
1 file changed
+3
-2
+3
-2
@@ -396,9 +396,10 @@ static char *finish_pre_exec(pid_t pid, int write_fd, int read_fd, char *request
|
||||
if (wait_process(pid, &status, 0) < 0
|
||||
|| !WIFEXITED(status) || WEXITSTATUS(status) != 0) {
|
||||
char *e;
|
||||
if (asprintf(&e, "pre-xfer exec returned failure (%d)%s%s\n%s",
|
||||
if (asprintf(&e, "pre-xfer exec returned failure (%d)%s%s%s\n%s",
|
||||
status, status < 0 ? ": " : "",
|
||||
status < 0 ? strerror(errno) : "", buf) < 0)
|
||||
status < 0 ? strerror(errno) : "",
|
||||
*buf ? ":" : "", buf) < 0)
|
||||
return "out_of_memory in finish_pre_exec\n";
|
||||
return e;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user