From edecdad54de4c47609319d469ec41fbd36c0ab35 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Thu, 13 May 2004 06:46:20 +0000 Subject: [PATCH] If we got a read-error on a file, make sure that the whole-file checksum we send to the receiver is wrong (so they won't save the bogus file). --- match.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/match.c b/match.c index 7bf2cf4e..6909fca3 100644 --- a/match.c +++ b/match.c @@ -322,6 +322,9 @@ void match_sums(int f, struct sum_struct *s, struct map_struct *buf, OFF_T len) } sum_end(file_sum); + /* If we had a read error, send a bad checksum. */ + if (buf && buf->status != 0) + file_sum[0]++; if (verbose > 2) rprintf(FINFO,"sending file_sum\n"); -- 2.34.1