Matt McCutchen's Web Site
/
rsync
/
rsync-patches.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4784149
)
Need to make sure that the destination file doesn't exist before we
author
Wayne Davison
<wayned@samba.org>
Mon, 27 Sep 2004 18:52:51 +0000
(18:52 +0000)
committer
Wayne Davison
<wayned@samba.org>
Mon, 27 Sep 2004 18:52:51 +0000
(18:52 +0000)
try to link from a hashed file to the destination.
link-by-hash.diff
patch
|
blob
|
blame
|
history
diff --git
a/link-by-hash.diff
b/link-by-hash.diff
index
37a3450
..
49bcf6b
100644
(file)
--- a/
link-by-hash.diff
+++ b/
link-by-hash.diff
@@
-323,6
+323,7
@@
the file's name.
+ if (!first) {
+ rprintf(FINFO, "link-by-hash (existing): \"%s\" -> %s\n",
+ linkname, full_fname(fname));
++ robust_unlink(fname);
+ rc = do_link(linkname, fname);
+ if (rc == -1) {
+ if (errno == EMLINK) {
@@
-335,7
+336,6
@@
the file's name.
+ } else {
+ rsyserr(FERROR, errno, "link \"%s\" -> \"%s\"",
+ linkname, full_fname(fname));
-+ robust_unlink(fname);
+ rc = robust_rename(fnametmp,fname,0644);
+ }
+ } else {