From cfce9f6dc353a013ab8d07c20a392aeaf6cab5ea Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Tue, 30 Aug 2005 02:57:19 +0000 Subject: [PATCH] Reject attempts to combine --sparse with --inplace. --- options.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/options.c b/options.c index cb721d6a..aa231f7f 100644 --- a/options.c +++ b/options.c @@ -1159,6 +1159,14 @@ int parse_arguments(int *argc, const char ***argv, int frommain) bwlimit_writemax = 512; } + if (sparse_files && inplace) { + /* Note: we don't check for this below, because --update is + * OK with --sparse (as long as redos are handled right). */ + snprintf(err_buf, sizeof err_buf, + "--sparse cannot be used with --inplace\n"); + return 0; + } + if (append_mode) { if (whole_file > 0) { snprintf(err_buf, sizeof err_buf, -- 2.34.1