Commit c0685c05 authored by Wayne Davison's avatar Wayne Davison

Fixed hang when --hard-links was processing a large directory

hierarchy with no files.
parent b7386d23
......@@ -2027,8 +2027,14 @@ void generate_files(int f_out, const char *local_name)
do {
#ifdef SUPPORT_HARD_LINKS
if (preserve_hard_links && inc_recurse) {
while (!flist_eof && file_total < FILECNT_LOOKAHEAD/2)
while (!flist_eof) {
int cnt = first_flist->prev
? first_flist->prev->ndx_end - first_flist->ndx_start + 1
: first_flist->ndx_end - first_flist->ndx_start + 1;
if (cnt >= FILECNT_LOOKAHEAD/2)
break;
wait_for_receiver();
}
}
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment