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)
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;
+ if (fnamecmp == fname)
+ fnamecmp = get_backup_name(fname);
+ }
/* Change permissions before putting the file into place. */
set_file_attrs(fnametmp, file, NULL, fnamecmp,