Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed the backing up of a device or socket.
[rsync/rsync.git]
/
rsync.c
diff --git
a/rsync.c
b/rsync.c
index
c384ed9
..
85244c8
100644
(file)
--- 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[])
{
void send_protected_args(int fd, char *args[])
{
+ int i;
#ifdef ICONV_OPTION
#ifdef ICONV_OPTION
- int
i,
convert = ic_send != (iconv_t)-1;
+ int convert = ic_send != (iconv_t)-1;
xbuf outbuf, inbuf;
if (convert)
xbuf outbuf, inbuf;
if (convert)
@@
-560,8
+561,12
@@
int finish_transfer(const char *fname, const char *fnametmp,
goto do_set_file_attrs;
}
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,
/* Change permissions before putting the file into place. */
set_file_attrs(fnametmp, file, NULL, fnamecmp,