X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/100b62bb6936c3fb3eea0460885417277b979046..630f548ff4dbe6692045291f117a25f7371b567d:/util.c diff --git a/util.c b/util.c index 28a00ef8..449b101e 100644 --- a/util.c +++ b/util.c @@ -362,8 +362,8 @@ int robust_unlink(char *fname) #endif } -/* Returns 0 on success, -1 on most errors, and -2 if we got an error - * trying to copy the file across file systems. */ +/* Returns 0 on successful rename, 1 if we successfully copied the file + * across filesystems, -2 if copy_file() failed, and -1 on other errors. */ int robust_rename(char *from, char *to, int mode) { int tries = 4; @@ -383,7 +383,7 @@ int robust_rename(char *from, char *to, int mode) if (copy_file(from, to, mode) != 0) return -2; do_unlink(from); - return 0; + return 1; default: return -1; }