summaryrefslogtreecommitdiff
path: root/rsync.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2008-10-11 10:27:16 -0700
committerWayne Davison <wayned@samba.org>2008-10-11 10:27:16 -0700
commit08b7c3ed832fec774257a75152a697cd0a4b7447 (patch)
tree12a7f607934a99cbee1ceea8cda1fa9e30c69c69 /rsync.c
parent76181461f582d385da73172d06532c4e4ec3f681 (diff)
downloadrsync-08b7c3ed832fec774257a75152a697cd0a4b7447.tar.gz
Fixed send_protected_args() to send "." in place of an empty arg.
Diffstat (limited to 'rsync.c')
-rw-r--r--rsync.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/rsync.c b/rsync.c
index 2d8e5e42..845517d6 100644
--- a/rsync.c
+++ b/rsync.c
@@ -220,16 +220,19 @@ void send_protected_args(int fd, char *args[])
if (DEBUG_GTE(CMD, 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);