BUG: Shell escaping needs to write % as %% for VS IDE.
This commit is contained in:
parent
e1260b8468
commit
73197eaefa
|
@ -287,6 +287,15 @@ static int kwsysSystem_Shell__GetArgumentSize(const char* in,
|
||||||
++size;
|
++size;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(*c == '%')
|
||||||
|
{
|
||||||
|
if(flags & kwsysSystem_Shell_Flag_VSIDE)
|
||||||
|
{
|
||||||
|
/* In a VS IDE a percent is written %% so we need one extra
|
||||||
|
characters. */
|
||||||
|
size += 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check whether the argument needs surrounding quotes. */
|
/* Check whether the argument needs surrounding quotes. */
|
||||||
|
@ -432,6 +441,20 @@ static char* kwsysSystem_Shell__GetArgument(const char* in, char* out,
|
||||||
*out++ = '#';
|
*out++ = '#';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(*c == '%')
|
||||||
|
{
|
||||||
|
if(flags & kwsysSystem_Shell_Flag_VSIDE)
|
||||||
|
{
|
||||||
|
/* In a VS IDE a percent is written %%. */
|
||||||
|
*out++ = '%';
|
||||||
|
*out++ = '%';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Otherwise a percent is written just %. */
|
||||||
|
*out++ = '%';
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Store this character. */
|
/* Store this character. */
|
||||||
|
|
Loading…
Reference in New Issue