X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/19531e1f7444358c7c99726dfac6088b6df69b1e..71456d301f8b28bab6fd29106ea4bb15c945a7d7:/compat.c diff --git a/compat.c b/compat.c index 80c44a34..a1a0f247 100644 --- a/compat.c +++ b/compat.c @@ -220,6 +220,17 @@ void setup_protocol(int f_out,int f_in) && !delete_before && !delete_after && !delay_updates && !use_qsort && !prune_empty_dirs) inc_recurse = 1; + if (am_server || read_batch) { + int i_r = read_byte(f_in); + if (i_r && !inc_recurse) { + fprintf(stderr, + "Incompatible options specified for inc-recursive %s.\n", + read_batch ? "batch file" : "connection"); + exit_cleanup(RERR_SYNTAX); + } + inc_recurse = i_r; + } else + write_byte(f_out, inc_recurse); need_messages_from_generator = 1; }