summaryrefslogtreecommitdiff
path: root/options.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2007-05-05 18:34:37 +0000
committerWayne Davison <wayned@samba.org>2007-05-05 18:34:37 +0000
commit4f3797c7e261a7acc83d35bb930d271f19d63be3 (patch)
tree6f0939741f65ad03d33fbba16c6ecf6f92718e67 /options.c
parent6b5a8f80fc68baeb6914fc33fdd2b6e8f24de7a1 (diff)
downloadrsync-4f3797c7e261a7acc83d35bb930d271f19d63be3.tar.gz
Clumped some option-sending together that only happens on the sending side.
Diffstat (limited to 'options.c')
-rw-r--r--options.c46
1 files changed, 24 insertions, 22 deletions
diff --git a/options.c b/options.c
index 084f5c30..57c4446e 100644
--- a/options.c
+++ b/options.c
@@ -1856,35 +1856,37 @@ void server_options(char **args,int *argc)
if (numeric_ids)
args[ac++] = "--numeric-ids";
- if (ignore_existing && am_sender)
- args[ac++] = "--ignore-existing";
+ if (am_sender) {
+ if (ignore_existing)
+ args[ac++] = "--ignore-existing";
+
+ /* Backward compatibility: send --existing, not --ignore-non-existing. */
+ if (ignore_non_existing)
+ args[ac++] = "--existing";
- /* Backward compatibility: send --existing, not --ignore-non-existing. */
- if (ignore_non_existing && am_sender)
- args[ac++] = "--existing";
+ if (tmpdir) {
+ args[ac++] = "--temp-dir";
+ args[ac++] = tmpdir;
+ }
+
+ if (basis_dir[0]) {
+ /* the server only needs this option if it is not the sender,
+ * and it may be an older version that doesn't know this
+ * option, so don't send it if client is the sender.
+ */
+ int i;
+ for (i = 0; i < basis_dir_cnt; i++) {
+ args[ac++] = dest_option;
+ args[ac++] = basis_dir[i];
+ }
+ }
+ }
if (append_mode)
args[ac++] = "--append";
else if (inplace)
args[ac++] = "--inplace";
- if (tmpdir && am_sender) {
- args[ac++] = "--temp-dir";
- args[ac++] = tmpdir;
- }
-
- if (basis_dir[0] && am_sender) {
- /* the server only needs this option if it is not the sender,
- * and it may be an older version that doesn't know this
- * option, so don't send it if client is the sender.
- */
- int i;
- for (i = 0; i < basis_dir_cnt; i++) {
- args[ac++] = dest_option;
- args[ac++] = basis_dir[i];
- }
- }
-
if (files_from && (!am_sender || filesfrom_host)) {
if (filesfrom_host) {
args[ac++] = "--files-from";