X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/378a074c82bdb393b5780832598aaa1c648926b8..f0359dd00d60d72c4b3dec85de8e490692f6015c:/backup.c diff --git a/backup.c b/backup.c index ee323f3f..52590c13 100644 --- a/backup.c +++ b/backup.c @@ -134,10 +134,14 @@ static int robust_move(char *src, char *dst) int failed; while (keep_trying) { - if (keep_path_extfs) - failed = copy_file (src, dst, 0755); - else + if (keep_path_extfs) { + failed = copy_file(src, dst, 0755); + if (!failed) { + do_unlink(src); + } + } else { failed = robust_rename (src, dst); + } if (failed) { if (verbose > 2)