X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/feb8dacc148d5428be2498e5748ef9aa2ea889a2..9be5093726d73826b63f18435940bbe1afddc66c:/options.c diff --git a/options.c b/options.c index 75fa1ab6..b6f7bae4 100644 --- a/options.c +++ b/options.c @@ -1357,6 +1357,12 @@ int parse_arguments(int *argc_p, const char ***argv_p) "--read-batch cannot be used with --files-from\n"); return 0; } + if (read_batch && remove_source_files) { + snprintf(err_buf, sizeof err_buf, + "--read-batch cannot be used with --remove-%s-files\n", + remove_source_files == 1 ? "source" : "sent"); + return 0; + } if (batch_name && strlen(batch_name) > MAX_BATCH_NAME_LEN) { snprintf(err_buf, sizeof err_buf, "the batch-file name must be %d characters or less.\n",