Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
89afe53
)
A couple fixes from Shinichi Maruyama.
author
Wayne Davison
<wayned@samba.org>
Mon, 23 Feb 2004 07:03:03 +0000
(07:03 +0000)
committer
Wayne Davison
<wayned@samba.org>
Mon, 23 Feb 2004 07:03:03 +0000
(07:03 +0000)
backup.c
patch
|
blob
|
blame
|
history
diff --git
a/backup.c
b/backup.c
index
2078861
..
56e26e1
100644
(file)
--- a/
backup.c
+++ b/
backup.c
@@
-130,8
+130,8
@@
failure:
/* robustly move a file, creating new directory structures if necessary */
static int robust_move(char *src, char *dst)
{
/* 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, 0755) != 0
&& (
errno != ENOENT
+ || make_bak_dir(dst) < 0 || robust_rename(src, dst, 0755) != 0)
)
return -1;
return 0;
}
return -1;
return 0;
}
@@
-224,7
+224,7
@@
static int keep_backup(char *fname)
/* move to keep tree if a file */
if (!kept) {
/* move to keep tree if a file */
if (!kept) {
- if (
!robust_move(fname, backup_dir_buf)
) {
+ if (
robust_move(fname, backup_dir_buf) != 0
) {
rprintf(FERROR, "keep_backup failed: %s -> \"%s\": %s\n",
full_fname(fname), backup_dir_buf, strerror(errno));
}
rprintf(FERROR, "keep_backup failed: %s -> \"%s\": %s\n",
full_fname(fname), backup_dir_buf, strerror(errno));
}