diff options
author | Wayne Davison <wayne@opencoder.net> | 2022-08-15 18:18:11 -0700 |
---|---|---|
committer | Wayne Davison <wayne@opencoder.net> | 2022-08-15 18:55:05 -0700 |
commit | db4f919ebe3dd99a8986d0dc4892ddcda795facf (patch) | |
tree | dce04a3e65436449a4c453a4d7b2fc6c98007fb4 /options.c | |
parent | 6ac2c7b682a427fc80d142e80e73858346a2d024 (diff) | |
download | rsync-db4f919ebe3dd99a8986d0dc4892ddcda795facf.tar.gz |
Allow ~/remote/./path with -R if the path has /./ in it.
Diffstat (limited to 'options.c')
-rw-r--r-- | options.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; } |