summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2008-10-11 10:16:47 -0700
committerWayne Davison <wayned@samba.org>2008-10-11 10:16:47 -0700
commitcf1b29220199f3290892772c41637710d41e53ab (patch)
treedab365118eed63b7016666e515f72620901eb41d
parentf3721ed133cc2464aba94386f4ef2911c5f53ed7 (diff)
downloadrsync-cf1b29220199f3290892772c41637710d41e53ab.tar.gz
rsync-cf1b29220199f3290892772c41637710d41e53ab.tar.bz2
rsync-cf1b29220199f3290892772c41637710d41e53ab.zip
Fixed send_protected_args() to send "." in place of an empty arg.
-rw-r--r--rsync.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/rsync.c b/rsync.c
index 30f5a07f..0dbbdc91 100644
--- a/rsync.c
+++ b/rsync.c
@@ -221,16 +221,19 @@ void send_protected_args(int fd, char *args[])
if (verbose > 1)
print_child_argv("protected args:", args + i + 1);
do {
+ if (!args[i][0])
+ write_buf(fd, ".", 2);
#ifdef ICONV_OPTION
- if (convert) {
+ else if (convert) {
INIT_XBUF_STRLEN(inbuf, args[i]);
iconvbufs(ic_send, &inbuf, &outbuf,
ICB_EXPAND_OUT | ICB_INCLUDE_BAD | ICB_INCLUDE_INCOMPLETE);
outbuf.buf[outbuf.len] = '\0';
write_buf(fd, outbuf.buf, outbuf.len + 1);
outbuf.len = 0;
- } else
+ }
#endif
+ else
write_buf(fd, args[i], strlen(args[i]) + 1);
} while (args[++i]);
write_byte(fd, 0);