skip backslash escape (#340)

This commit is contained in:
Yanbing 2018-08-15 12:53:45 -07:00 committed by GitHub
parent 48e0cdbd5f
commit 3b303808b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

4
scp.c
View File

@ -502,13 +502,13 @@ main(int argc, char **argv)
glob_t g;
int expandargc = 0;
memset(&g, 0, sizeof(g));
for (n = 0; n < argc; n++) {
for (n = 0; n < argc; n++) {
argdup = xstrdup(argv[n]);
if (p = colon(argdup))
convertToForwardslash(p);
else
convertToForwardslash(argdup);
if (glob(argdup, GLOB_NOCHECK, NULL, &g)) {
if (glob(argdup, GLOB_NOCHECK | GLOB_NOESCAPE, NULL, &g)) {
if (expandargc > argc)
newargv = xreallocarray(newargv, expandargc + 1, sizeof(*newargv));
newargv[expandargc++] = xstrdup(argdup);