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:
33cc92a
)
Fixed a problem with a file descriptor being left open in the
author
Wayne Davison
<wayned@samba.org>
Thu, 26 Jun 2008 15:14:11 +0000
(08:14 -0700)
committer
Wayne Davison
<wayned@samba.org>
Thu, 26 Jun 2008 15:14:11 +0000
(08:14 -0700)
generator when handling an empty file.
generator.c
patch
|
blob
|
blame
|
history
diff --git
a/generator.c
b/generator.c
index
9b371e8
..
724cebe
100644
(file)
--- a/
generator.c
+++ b/
generator.c
@@
-1953,9
+1953,12
@@
static void recv_generator(char *fname, struct file_struct *file, int ndx,
if (read_batch)
goto cleanup;
- if (statret != 0 || whole_file
|| sx.st.st_size <= 0
)
+ if (statret != 0 || whole_file)
write_sum_head(f_out, NULL);
- else {
+ else if (sx.st.st_size <= 0) {
+ write_sum_head(f_out, NULL);
+ close(fd);
+ } else {
if (generate_and_send_sums(fd, sx.st.st_size, f_out, f_copy) < 0) {
rprintf(FWARNING,
"WARNING: file is too large for checksum sending: %s\n",