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:
b3e4125
)
Replace another assert with a descriptive error.
author
Wayne Davison
<wayned@samba.org>
Sat, 26 Jun 2010 22:50:07 +0000
(15:50 -0700)
committer
Wayne Davison
<wayned@samba.org>
Sat, 26 Jun 2010 23:06:09 +0000
(16:06 -0700)
hlink.c
patch
|
blob
|
blame
|
history
diff --git
a/hlink.c
b/hlink.c
index
179dd25
..
0e61d5a
100644
(file)
--- a/
hlink.c
+++ b/
hlink.c
@@
-552,7
+552,11
@@
void finish_hard_link(struct file_struct *file, const char *fname, int fin_ndx,
rprintf(FERROR, "Hlink node data for %d is NULL (%s)\n", gnum, f_name(file, prev_name));
exit_cleanup(RERR_MESSAGEIO);
}
rprintf(FERROR, "Hlink node data for %d is NULL (%s)\n", gnum, f_name(file, prev_name));
exit_cleanup(RERR_MESSAGEIO);
}
- assert(CVAL(node->data, 0) == 0);
+ if (CVAL(node->data, 0) != 0) {
+ rprintf(FERROR, "Hlink node data for %d already has path=%s (%s)\n",
+ gnum, (char*)node->data, f_name(file, prev_name));
+ exit_cleanup(RERR_MESSAGEIO);
+ }
free(node->data);
if (!(node->data = strdup(our_name)))
out_of_memory("finish_hard_link");
free(node->data);
if (!(node->data = strdup(our_name)))
out_of_memory("finish_hard_link");