X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/53936ef935e97d2036ad09b61b7040979d175469..e9489cd6cb380b30727bd3d074eacc59abca080e:/rsync.c diff --git a/rsync.c b/rsync.c index c384ed9b..9921da04 100644 --- a/rsync.c +++ b/rsync.c @@ -207,8 +207,9 @@ int iconvbufs(iconv_t ic, xbuf *in, xbuf *out, int flags) void send_protected_args(int fd, char *args[]) { + int i; #ifdef ICONV_OPTION - int i, convert = ic_send != (iconv_t)-1; + int convert = ic_send != (iconv_t)-1; xbuf outbuf, inbuf; if (convert) @@ -560,8 +561,11 @@ int finish_transfer(const char *fname, const char *fnametmp, goto do_set_file_attrs; } - if (make_backups > 0 && overwriting_basis && !make_backup(fname)) - return 1; + if (make_backups > 0 && overwriting_basis) { + if (!make_backup(fname)) + return 1; + fnamecmp = get_backup_name(fname); + } /* Change permissions before putting the file into place. */ set_file_attrs(fnametmp, file, NULL, fnamecmp,