diff options
author | Wayne Davison <wayned@samba.org> | 2010-06-26 15:50:07 -0700 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2010-06-26 16:06:09 -0700 |
commit | 18070203c27337c33101bb22f54f924da65387b2 (patch) | |
tree | d9eff4e5f0cae11cafb6a974eab5030b0a8ce968 /hlink.c | |
parent | b3e41255a63523627423ee5b21a8406ebfb2de79 (diff) | |
download | rsync-18070203c27337c33101bb22f54f924da65387b2.tar.gz |
Replace another assert with a descriptive error.
Diffstat (limited to 'hlink.c')
-rw-r--r-- | hlink.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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); } - 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"); |