[cmake-commits] hoffman committed SystemTools.cxx 1.191 1.192
cmake-commits at cmake.org
cmake-commits at cmake.org
Wed Feb 21 21:24:19 EST 2007
Update of /cvsroot/CMake/CMake/Source/kwsys
In directory public:/mounts/ram/cvs-serv8802/Source/kwsys
Modified Files:
SystemTools.cxx
Log Message:
ENH: fix parens in the path with spaces in the path
Index: SystemTools.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/kwsys/SystemTools.cxx,v
retrieving revision 1.191
retrieving revision 1.192
diff -u -d -r1.191 -r1.192
--- SystemTools.cxx 1 Feb 2007 19:45:08 -0000 1.191
+++ SystemTools.cxx 22 Feb 2007 02:24:17 -0000 1.192
@@ -1414,7 +1414,7 @@
ret.erase(pos, 1);
}
// escape spaces and () in the path
- if(ret.find_first_of(" ()") != kwsys_stl::string::npos)
+ if(ret.find_first_of(" ") != kwsys_stl::string::npos)
{
kwsys_stl::string result = "";
char lastch = 1;
@@ -1422,22 +1422,9 @@
for(const char* ch = ret.c_str(); *ch != '\0'; ++ch)
{
// if it is already escaped then don't try to escape it again
- if((*ch == ' ' || *ch == '(' || *ch == ')') && lastch != '\\')
+ if((*ch == ' ') && lastch != '\\')
{
- if(*ch == '(' && lastch == '$')
- {
- inDollarVariable = true;
- }
- // if we are in a $(..... and we get a ) then do not escape
- // the ) and but set inDollarVariable to false
- else if(*ch == ')' && inDollarVariable)
- {
- inDollarVariable = false;
- }
- else
- {
- result += '\\';
- }
+ result += '\\';
}
result += *ch;
lastch = *ch;
More information about the Cmake-commits
mailing list