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
Fix suggested by Jos for hands.test. Some of the functionality
[rsync/rsync.git]
/
hlink.c
diff --git
a/hlink.c
b/hlink.c
index
a79d15a
..
a38a65b
100644
(file)
--- a/
hlink.c
+++ b/
hlink.c
@@
-97,14
+97,21
@@
int check_hard_link(struct file_struct *file)
low = mid + 1;
}
low = mid + 1;
}
+ /* XXX: To me this looks kind of dodgy -- why do we use [low]
+ * here and [low-1] below? -- mbp */
if (hlink_compare(&hlink_list[low], file) != 0)
return 0;
if (low > 0 &&
S_ISREG(hlink_list[low - 1].mode) &&
file->dev == hlink_list[low - 1].dev &&
if (hlink_compare(&hlink_list[low], file) != 0)
return 0;
if (low > 0 &&
S_ISREG(hlink_list[low - 1].mode) &&
file->dev == hlink_list[low - 1].dev &&
- file->inode == hlink_list[low - 1].inode)
+ file->inode == hlink_list[low - 1].inode) {
+ if (verbose >= 2) {
+ rprintf(FINFO, "check_hard_link: \"%s\" is a hard link to file %d, \"%s\"\n",
+ f_name(file), low-1, f_name(&hlink_list[low-1]));
+ }
return 1;
return 1;
+ }
#endif
return 0;
#endif
return 0;