mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-02 04:09:33 -05:00
BUG: Fix escaping of more characters on Windows shells.
This commit is contained in:
+10
-7
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user