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:
d0fd26a
)
I can't believe it - solaris allows unlink of a non-empty directory as
author
Andrew Tridgell
<tridge@samba.org>
Mon, 24 Jan 2000 09:13:39 +0000
(09:13 +0000)
committer
Andrew Tridgell
<tridge@samba.org>
Mon, 24 Jan 2000 09:13:39 +0000
(09:13 +0000)
root, leaving a corrupt filesystem. Are those guys on drugs?
try to avoid the problem as best we can.
rsync.c
patch
|
blob
|
blame
|
history
diff --git
a/rsync.c
b/rsync.c
index
039e1cd
..
ce8e901
100644
(file)
--- a/
rsync.c
+++ b/
rsync.c
@@
-56,8
+56,6
@@
int delete_file(char *fname)
int ret;
extern int recurse;
- if (robust_unlink(fname) == 0 || errno == ENOENT) return 0;
-
#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 (robust_unlink(fname) == 0 || errno == ENOENT) return 0;
rprintf(FERROR,"unlink(%s) : %s\n", fname, strerror(errno));
return -1;
}