Skip to content

Commit 5374994

Browse files
committed
Avoid quoting of tilde when it's a destination arg.
1 parent 5263661 commit 5374994

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

options.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2510,7 +2510,7 @@ char *safe_arg(const char *opt, const char *arg)
25102510
char *ret;
25112511
if (!protect_args && old_style_args < 2 && (!old_style_args || (!is_filename_arg && opt != SPLIT_ARG_WHEN_OLD))) {
25122512
const char *f;
2513-
if (!trust_sender_args && *arg == '~'
2513+
if (*arg == '~' && is_filename_arg && !am_sender && !trust_sender_args
25142514
&& ((relative_paths && !strstr(arg, "/./"))
25152515
|| !strchr(arg, '/'))) {
25162516
extras++;

0 commit comments

Comments
 (0)