X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/b5c6a6aeeb7d526e023454ea681b7381945bced8..fa3e4a0548699ccaac41df2428fe1ad9d3659435:/backup.c diff --git a/backup.c b/backup.c index 11011cfd..4669c7ee 100644 --- a/backup.c +++ b/backup.c @@ -160,8 +160,9 @@ static int make_bak_dir(char *fullpath) /* robustly move a file, creating new directory structures if necessary */ static int robust_move(char *src, char *dst) { - if (robust_rename(src, dst, 0755) < 0 && (errno != ENOENT - || make_bak_dir(dst) < 0 || robust_rename(src, dst, 0755) < 0)) + if (robust_rename(src, dst, NULL, 0755) < 0 + && (errno != ENOENT || make_bak_dir(dst) < 0 + || robust_rename(src, dst, NULL, 0755) < 0)) return -1; return 0; } @@ -261,7 +262,7 @@ static int keep_backup(char *fname) robust_unlink(fname); /* Just in case... */ } } - set_perms(buf, file, NULL, 0); + set_file_attrs(buf, file, NULL, 0); free(file); if (verbose > 1) {