]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
Help avoid a --sparse --inplace bug in older rsyncs.
authorWayne Davison <wayne@opencoder.net>
Mon, 27 Sep 2021 17:16:15 +0000 (10:16 -0700)
committerWayne Davison <wayne@opencoder.net>
Mon, 27 Sep 2021 17:16:15 +0000 (10:16 -0700)
options.c

index 9ffc3cf7a8628e872c80da0fefe84437650cb68e..54998661021997ec470cef1c065b1497b2ceafd4 100644 (file)
--- 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) {