From: Wayne Davison Date: Tue, 16 Aug 2022 01:18:11 +0000 (-0700) Subject: Allow ~/remote/./path with -R if the path has /./ in it. X-Git-Tag: v3.2.6~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=db4f919ebe3dd99a8986d0dc4892ddcda795facf;p=thirdparty%2Frsync.git Allow ~/remote/./path with -R if the path has /./ in it. --- diff --git a/options.c b/options.c index 4feeb7e0..5b3d6dea 100644 --- a/options.c +++ b/options.c @@ -2508,7 +2508,9 @@ 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 == '~' && (relative_paths || !strchr(arg, '/'))) { + if (!trust_sender_args && *arg == '~' + && ((relative_paths && !strstr(arg, "/./")) + || !strchr(arg, '/'))) { extras++; escape_leading_tilde = 1; }