add: if (head_file->F_HLINDEX == FINISHED_LINK) { STRUCT_STAT st2; char *toname = f_name(head_file); if (link_stat(toname, &st2, 0) < 0) { rsyserr(FERROR, errno, "stat %s failed", full_fname(toname)); return -1; } maybe_hard_link(file, ndx, fname, statret, st, toname, &st2, itemizing, code); file->F_HLINDEX = FINISHED_LINK; } else file->F_HLINDEX = SKIPPED_LINK;
context: int hard_link_check(struct file_struct *file, int ndx, int skip){#ifdef SUPPORT_HARD_LINKS	if (!file->link_u.links)		return 0;	if (skip && !(file->flags & FLAG_HLINK_EOL))		hlink_list[file->F_HLINDEX] = file->F_NEXT;	if (hlink_list[file->F_HLINDEX] != ndx) {		if (verbose > 2) {			rprintf(FINFO, "\"%s\" is a hard link\n",				safe_fname(f_name(file)));		}		return 1;	}#endif	return 0;}