projects
/
platform
/
upstream
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b7386d2
)
Fixed hang when --hard-links was processing a large directory
author
Wayne Davison
<wayned@samba.org>
Sat, 3 Nov 2007 15:27:14 +0000
(15:27 +0000)
committer
Wayne Davison
<wayned@samba.org>
Sat, 3 Nov 2007 15:27:14 +0000
(15:27 +0000)
hierarchy with no files.
generator.c
patch
|
blob
|
history
diff --git
a/generator.c
b/generator.c
index
db0824d
..
24435ea
100644
(file)
--- a/
generator.c
+++ b/
generator.c
@@
-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