can handle quoted file names just fine, removing the quote lifts
the limit from a very frequent use case, because using quoted
file names is commonplace on MS-Windows. */
- static const char *sh_chars_dos = "|&<>";
+ static const char *sh_chars_dos = "|&<>%";
static const char *sh_cmds_dos[] =
{ "assoc", "break", "call", "cd", "chcp", "chdir", "cls", "color", "copy",
"ctty", "date", "del", "dir", "echo", "echo.", "endlocal", "erase",
else if (instring == '"' && strchr ("\\$`", *p) != 0 && unixy_shell)
goto slow;
#ifdef WINDOWS32
- /* Quoted wildcard characters must be passed quoted to the
+ /* Quoted wildcard and % characters must be passed quoted to the
command, so give up the fast route. */
- else if (instring == '"' && strchr ("*?", *p) != 0 && !unixy_shell)
+ else if (instring == '"' && strchr ("*?%", *p) != 0 && !unixy_shell)
goto slow;
else if (instring == '"' && strncmp (p, "\\\"", 2) == 0)
*ap++ = *++p;