1 --- orig/rsync.c 2004-07-26 16:06:53
2 +++ rsync.c 2004-07-26 06:27:27
3 @@ -246,6 +246,9 @@ void finish_transfer(char *fname, char *
7 + /* Change permissions before putting the file into place. */
8 + set_perms(fnametmp, file, NULL, ok_to_set_time ? 0 : PERMS_SKIP_MTIME);
10 /* move tmp file over real file */
12 rprintf(FINFO, "renaming %s to %s\n", fnametmp, fname);
13 @@ -257,6 +260,10 @@ void finish_transfer(char *fname, char *
18 + /* The file was moved into place (not copied), so it's done. */
22 set_perms(fname, file, NULL, ok_to_set_time ? 0 : PERMS_SKIP_MTIME);
24 --- orig/t_stub.c 2004-07-29 16:08:04
25 +++ t_stub.c 2004-07-03 20:17:55
27 * functions, so that module test harnesses can run standalone.
31 int modify_window = 0;
34 --- orig/util.c 2004-07-29 16:08:04
35 +++ util.c 2004-07-03 20:17:55
42 extern int modify_window;
43 extern char *partial_dir;
44 @@ -264,6 +265,8 @@ int copy_file(char *source, char *dest,
48 + if (!am_root && !(mode & S_IWUSR))
50 ofd = do_open(dest, O_WRONLY | O_CREAT | O_TRUNC | O_EXCL, mode);
52 rsyserr(FERROR, errno, "open %s", full_fname(dest));
53 @@ -362,8 +365,8 @@ int robust_unlink(char *fname)
57 -/* Returns 0 on success, -1 on most errors, and -2 if we got an error
58 - * trying to copy the file across file systems. */
59 +/* Returns 0 on successful rename, 1 if we successfully copied the file
60 + * across filesystems, -2 if copy_file() failed, and -1 on other errors. */
61 int robust_rename(char *from, char *to, int mode)
64 @@ -380,10 +383,12 @@ int robust_rename(char *from, char *to,
68 + if (!am_root && !(mode & S_IRUSR))
69 + do_chmod(from, (mode & CHMOD_BITS) | S_IRUSR);
70 if (copy_file(from, to, mode) != 0)