X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/950ab32d38ab6ed1940ba58ff250d414e9db4708..6bbbc08b83d2d2598a894439a1392c84a67168e2:/rsync.c diff --git a/rsync.c b/rsync.c index 3eb64678..682b2c4e 100644 --- a/rsync.c +++ b/rsync.c @@ -406,7 +406,7 @@ void recv_generator(char *fname,struct file_list *flist,int i,int f_out) return; } - if (update_only && st.st_mtime >= file->modtime) { + if (update_only && st.st_mtime > file->modtime) { if (verbose > 1) fprintf(FERROR,"%s is newer\n",fname); return; @@ -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)