Skip to content
Snippets Groups Projects
Commit e6cf0d6a authored by Brad King's avatar Brad King
Browse files

BUG: Fix escaping of more characters on Windows shells.

parent 472980d7
No related branches found
No related tags found
No related merge requests found
......@@ -74,6 +74,13 @@ static int kwsysSystem_Shell__CharNeedsQuotesOnUnix(char c)
(c == '*') || (c == '^') || (c == '\\'));
}
/*--------------------------------------------------------------------------*/
static int kwsysSystem_Shell__CharNeedsQuotesOnWindows(char c)
{
return ((c == '\'') || (c == '#') || (c == '&') ||
(c == '<') || (c == '>') || (c == '|') || (c == '^'));
}
/*--------------------------------------------------------------------------*/
static int kwsysSystem_Shell__CharNeedsQuotes(char c, int isUnix, int flags)
{
......@@ -99,14 +106,10 @@ static int kwsysSystem_Shell__CharNeedsQuotes(char c, int isUnix, int flags)
}
else
{
/* On Windows single-quotes must be escaped in some make
environments, such as in mingw32-make. */
if(flags & kwsysSystem_Shell_Flag_Make)
/* On Windows several special characters need quotes to preserve them. */
if(kwsysSystem_Shell__CharNeedsQuotesOnWindows(c))
{
if(c == '\'')
{
return 1;
}
return 1;
}
}
return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment