summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWayne Davison <wayne@opencoder.net>2022-11-05 09:14:33 -0700
committerWayne Davison <wayne@opencoder.net>2022-11-05 09:22:10 -0700
commit537499408948f4e3dd048a861eb58f211e4546f8 (patch)
tree287a4406c8c8252d4de235194cffeee0882675d0
parent526366129aea62d01e57b4e6304c5088f065cf5e (diff)
downloadrsync-537499408948f4e3dd048a861eb58f211e4546f8.tar.gz
Avoid quoting of tilde when it's a destination arg.
-rw-r--r--options.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/options.c b/options.c
index d38bbe8d..cfa3e1dc 100644
--- a/options.c
+++ b/options.c
@@ -2510,7 +2510,7 @@ char *safe_arg(const char *opt, const char *arg)
char *ret;
if (!protect_args && old_style_args < 2 && (!old_style_args || (!is_filename_arg && opt != SPLIT_ARG_WHEN_OLD))) {
const char *f;
- if (!trust_sender_args && *arg == '~'
+ if (*arg == '~' && is_filename_arg && !am_sender && !trust_sender_args
&& ((relative_paths && !strstr(arg, "/./"))
|| !strchr(arg, '/'))) {
extras++;