summaryrefslogtreecommitdiffstats
path: root/debian/patches/avoid_quoting_of_tilde_when_its_a_destination_arg.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/avoid_quoting_of_tilde_when_its_a_destination_arg.patch')
-rw-r--r--debian/patches/avoid_quoting_of_tilde_when_its_a_destination_arg.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/debian/patches/avoid_quoting_of_tilde_when_its_a_destination_arg.patch b/debian/patches/avoid_quoting_of_tilde_when_its_a_destination_arg.patch
new file mode 100644
index 0000000..66e2b52
--- /dev/null
+++ b/debian/patches/avoid_quoting_of_tilde_when_its_a_destination_arg.patch
@@ -0,0 +1,22 @@
+From 537499408948f4e3dd048a861eb58f211e4546f8 Mon Sep 17 00:00:00 2001
+From: Wayne Davison <wayne@opencoder.net>
+Date: Sat, 5 Nov 2022 09:14:33 -0700
+Subject: [PATCH] Avoid quoting of tilde when it's a destination arg.
+
+---
+ options.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/options.c b/options.c
+index d38bbe8db..cfa3e1dcd 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++;