From ec57c57baf848718bbab93fa0c597d15718acc5a Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Mon, 27 Sep 2021 10:16:15 -0700 Subject: [PATCH] Help avoid a --sparse --inplace bug in older rsyncs. --- options.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/options.c b/options.c index 9ffc3cf7..54998661 100644 --- a/options.c +++ b/options.c @@ -2828,8 +2828,12 @@ void server_options(char **args, int *argc_p) if (append_mode > 1) args[ac++] = "--append"; args[ac++] = "--append"; - } else if (inplace) + } else if (inplace) { args[ac++] = "--inplace"; + /* Work around a bug in older rsync versions (on the remote side) for --inplace --sparse */ + if (sparse_files && !whole_file) + args[ac++] = "--no-W"; + } if (files_from && (!am_sender || filesfrom_host)) { if (filesfrom_host) { -- 2.47.2