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
test was the wrong way around
[rsync/rsync.git]
/
rsync.c
diff --git
a/rsync.c
b/rsync.c
index
2d267a0
..
ce8e901
100644
(file)
--- a/
rsync.c
+++ b/
rsync.c
@@
-56,8
+56,6
@@
int delete_file(char *fname)
int ret;
extern int recurse;
int ret;
extern int recurse;
- if (robust_unlink(fname) == 0 || errno == ENOENT) return 0;
-
#if SUPPORT_LINKS
ret = do_lstat(fname, &st);
#else
#if SUPPORT_LINKS
ret = do_lstat(fname, &st);
#else
@@
-69,6
+67,7
@@
int delete_file(char *fname)
}
if (!S_ISDIR(st.st_mode)) {
}
if (!S_ISDIR(st.st_mode)) {
+ if (robust_unlink(fname) == 0 || errno == ENOENT) return 0;
rprintf(FERROR,"unlink(%s) : %s\n", fname, strerror(errno));
return -1;
}
rprintf(FERROR,"unlink(%s) : %s\n", fname, strerror(errno));
return -1;
}
@@
-152,7
+151,6
@@
int set_perms(char *fname,struct file_struct *file,STRUCT_STAT *st,
int updated = 0;
STRUCT_STAT st2;
int change_uid, change_gid;
int updated = 0;
STRUCT_STAT st2;
int change_uid, change_gid;
- extern int am_daemon;
if (dry_run) return 0;
if (dry_run) return 0;
@@
-260,6
+258,3
@@
void finish_transfer(char *fname, char *fnametmp, struct file_struct *file)
set_perms(fname,file,NULL,0);
}
}
set_perms(fname,file,NULL,0);
}
}
-
-
-