diff options
author | Wayne Davison <wayne@opencoder.net> | 2022-08-08 18:30:43 -0700 |
---|---|---|
committer | Wayne Davison <wayne@opencoder.net> | 2022-08-08 19:26:05 -0700 |
commit | 38e1b075b49664181a6b1727219b404debec035e (patch) | |
tree | 05421b48232a62928e9f351b085a071e90501144 /options.c | |
parent | d659610afc8a3ee53fe68a8a4bbd7fc768fcd6e9 (diff) | |
download | rsync-38e1b075b49664181a6b1727219b404debec035e.tar.gz |
Fix some issues with backslashed wildcards in args.
Diffstat (limited to 'options.c')
-rw-r--r-- | options.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -2521,7 +2521,10 @@ char *safe_arg(const char *opt, const char *arg) const char *f = arg; char *t = ret + len1; while (*f) { - if (strchr(escapes, *f)) + if (*f == '\\') { + if (!is_filename_arg || !strchr(WILD_CHARS, f[1])) + *t++ = '\\'; + } else if (strchr(escapes, *f)) *t++ = '\\'; *t++ = *f++; } |