Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Undo last setting of blocking_io. I hadn't reviewed the code well enough;
[rsync/rsync.git]
/
backup.c
diff --git
a/backup.c
b/backup.c
index
ee323f3
..
88f9eae
100644
(file)
--- a/
backup.c
+++ b/
backup.c
@@
-134,10
+134,14
@@
static int robust_move(char *src, char *dst)
int failed;
while (keep_trying) {
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);
failed = robust_rename (src, dst);
+ }
if (failed) {
if (verbose > 2)
if (failed) {
if (verbose > 2)
@@
-193,7
+197,7
@@
static int keep_backup(char *fname)
if (do_stat (fname, &st)) return 1;
#endif
if (do_stat (fname, &st)) return 1;
#endif
- file = make_file (0, fname);
+ file = make_file (0, fname
, 0
);
/* make a complete pathname for backup file */
if (strlen(backup_dir) + strlen(fname) > (MAXPATHLEN - 1)) {
/* make a complete pathname for backup file */
if (strlen(backup_dir) + strlen(fname) > (MAXPATHLEN - 1)) {