summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-01-13 19:19:48 +0000
committerAndrew Tridgell <tridge@samba.org>1998-01-13 19:19:48 +0000
commit13dc412d7670934e2bc9b80f3d42bb9e9ccfc93c (patch)
tree81b57ddc9c71187a02a0c6a2453043709e40301d
parent950ab32d38ab6ed1940ba58ff250d414e9db4708 (diff)
downloadrsync-13dc412d7670934e2bc9b80f3d42bb9e9ccfc93c.tar.gz
*** empty log message ***
-rw-r--r--rsync.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/rsync.c b/rsync.c
index 3eb64678..ea15ac84 100644
--- a/rsync.c
+++ b/rsync.c
@@ -811,20 +811,24 @@ int recv_files(int f_in,struct file_list *flist,char *local_name,int f_gen)
if (errno == EXDEV) {
/* rename failed on cross-filesystem link.
Copy the file instead. */
- if (copy_file(fnametmp,fname, file->mode))
+ if (copy_file(fnametmp,fname, file->mode)) {
fprintf(FERROR,"copy %s -> %s : %s\n",
fnametmp,fname,strerror(errno));
+ } else {
+ set_perms(fname,file,NULL,0);
+ }
unlink(fnametmp);
} else {
fprintf(FERROR,"rename %s -> %s : %s\n",
fnametmp,fname,strerror(errno));
unlink(fnametmp);
}
+ } else {
+ set_perms(fname,file,NULL,0);
}
cleanup_fname = NULL;
- set_perms(fname,file,NULL,0);
if (!recv_ok) {
if (verbose > 1)