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
Added missing calls to safe_fname() and full_fname().
[rsync/rsync.git]
/
hlink.c
diff --git
a/hlink.c
b/hlink.c
index
4228b73
..
330ef07
100644
(file)
--- a/
hlink.c
+++ b/
hlink.c
@@
-36,7
+36,7
@@
static int hlink_compare(struct file_struct **file1, struct file_struct **file2)
if (f1->F_INODE != f2->F_INODE)
return (int) (f1->F_INODE > f2->F_INODE ? 1 : -1);
if (f1->F_INODE != f2->F_INODE)
return (int) (f1->F_INODE > f2->F_INODE ? 1 : -1);
- return f
ile_compare(file1,
file2);
+ return f
_name_cmp(*file1, *
file2);
}
static struct file_struct **hlink_list;
}
static struct file_struct **hlink_list;
@@
-135,6
+135,7
@@
void init_hard_links(struct file_list *flist)
int hard_link_check(struct file_struct *file, int skip)
{
int hard_link_check(struct file_struct *file, int skip)
{
+#if SUPPORT_HARD_LINKS
if (!hlink_list || !file->link_u.links)
return 0;
if (skip && !(file->flags & FLAG_HLINK_EOL))
if (!hlink_list || !file->link_u.links)
return 0;
if (skip && !(file->flags & FLAG_HLINK_EOL))
@@
-142,10
+143,11
@@
int hard_link_check(struct file_struct *file, int skip)
if (hlink_list[file->F_HLINDEX] != file) {
if (verbose > 1) {
rprintf(FINFO, "\"%s\" is a hard link\n",
if (hlink_list[file->F_HLINDEX] != file) {
if (verbose > 1) {
rprintf(FINFO, "\"%s\" is a hard link\n",
-
f_name(file
));
+
safe_fname(f_name(file)
));
}
return 1;
}
}
return 1;
}
+#endif
return 0;
}
return 0;
}
@@
-155,11
+157,11
@@
static void hard_link_one(char *hlink1, char *hlink2)
if (do_link(hlink1, hlink2)) {
if (verbose) {
rsyserr(FINFO, errno, "link %s => %s failed",
if (do_link(hlink1, hlink2)) {
if (verbose) {
rsyserr(FINFO, errno, "link %s => %s failed",
-
hlink2, hlink1
);
+
full_name(hlink2), safe_fname(hlink1)
);
}
}
else if (verbose)
}
}
else if (verbose)
- rprintf(FINFO, "%s => %s\n",
hlink2, hlink1
);
+ rprintf(FINFO, "%s => %s\n",
safe_fname(hlink2), safe_fname(hlink1)
);
}
#endif
}
#endif