From 33ab4ad879e9355f57887324f06ec91b6a897ee4 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Thu, 3 Mar 2005 02:58:48 +0000 Subject: [PATCH] Simplified whole_file variable checking. --- generator.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/generator.c b/generator.c index 6e5f9a31..c1a86f49 100644 --- a/generator.c +++ b/generator.c @@ -950,7 +950,7 @@ prepare_to_open: statret = 0; } - if (dry_run || read_batch || whole_file > 0) + if (dry_run || read_batch || whole_file) goto notify_others; if (fuzzy_basis) { @@ -1040,7 +1040,7 @@ notify_others: if (dry_run || read_batch) return; - if (statret != 0 || whole_file > 0) { + if (statret != 0 || whole_file) { write_sum_head(f_out, NULL); return; } @@ -1102,9 +1102,11 @@ void generate_files(int f_out, struct file_list *flist, char *local_name, if (delete_before && !local_name && flist->count > 0) do_delete_pass(flist, allowed_lull); + if (whole_file < 0) + whole_file = 0; if (verbose >= 2) { rprintf(FINFO, "delta-transmission %s\n", - whole_file > 0 + whole_file ? "disabled for local transfer or --whole-file" : "enabled"); } -- 2.34.1