X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/8b3e60523aa3d86583a1df54c81c9d480ea19740..b3bf9b9df95137a3a43248be9599d919b04877af:/rsync.c diff --git a/rsync.c b/rsync.c index 2d8e5e42..c420cf83 100644 --- a/rsync.c +++ b/rsync.c @@ -3,7 +3,7 @@ * * Copyright (C) 1996 Andrew Tridgell * Copyright (C) 1996 Paul Mackerras - * Copyright (C) 2003-2008 Wayne Davison + * Copyright (C) 2003-2009 Wayne Davison * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -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); @@ -392,12 +395,7 @@ int set_file_attrs(const char *fname, struct file_struct *file, stat_x *sxp, full_fname(fname)); return 0; } -#ifdef SUPPORT_ACLS - sx2.acc_acl = sx2.def_acl = NULL; -#endif -#ifdef SUPPORT_XATTRS - sx2.xattr = NULL; -#endif + init_stat_x(&sx2); sxp = &sx2; inherit = !preserve_perms; } else