diff options
author | Wayne Davison <wayned@samba.org> | 2009-04-12 12:57:31 -0700 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2009-04-12 13:01:14 -0700 |
commit | 9be5093726d73826b63f18435940bbe1afddc66c (patch) | |
tree | c43adceb20ed3cd12839fe65228bfea80b682834 | |
parent | feb8dacc148d5428be2498e5748ef9aa2ea889a2 (diff) | |
download | rsync-9be5093726d73826b63f18435940bbe1afddc66c.tar.gz |
Don't allow --remove-s*-files with --read-batch.
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | options.c | 6 |
2 files changed, 9 insertions, 0 deletions
@@ -47,3 +47,6 @@ Changes since 3.0.5: - Fixed a run-time issue for systems that can't find iconv_open() by adding the --disable-iconv-open configure option. + + - Complain and die if the user tries to combine --remove-source-files (or + the deprecated --remove-sent-files) with --read-batch. @@ -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", |