From 3a90ea0acdc1414904959e4629c9c255be792e29 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Wed, 19 Jan 2005 00:23:32 +0000 Subject: [PATCH] - Added new int, keep_dirs, which is set if either recurse or files_from was specified. - Pass the the sender the --no-implied-dirs option if --relative was specified (or implied) and the sender is not the client. --- options.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/options.c b/options.c index 60b59b0c..a05b7587 100644 --- a/options.c +++ b/options.c @@ -76,6 +76,7 @@ int filesfrom_fd = -1; char *remote_filesfrom_file = NULL; int eol_nulls = 0; int recurse = 0; +int keep_dirs = 0; int am_daemon = 0; int daemon_over_rsh = 0; int do_stats = 0; @@ -850,9 +851,14 @@ int parse_arguments(int *argc, const char ***argv, int frommain) preserve_uid = 1; preserve_devices = 1; } + if (recurse) { + keep_dirs = 1; + } if (relative_paths < 0) relative_paths = files_from? 1 : 0; + if (!relative_paths) + implied_dirs = 0; *argv = poptGetArgs(pc); *argc = count_args(*argv); @@ -1003,6 +1009,7 @@ int parse_arguments(int *argc, const char ***argv, int frommain) return 0; } } + keep_dirs = 1; } return 1; @@ -1233,6 +1240,8 @@ void server_options(char **args,int *argc) if (!relative_paths) args[ac++] = "--no-relative"; } + if (relative_paths && !implied_dirs && !am_sender) + args[ac++] = "--no-implied-dirs"; *argc = ac; return; -- 2.34.1