summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2002-12-23 14:25:36 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2002-12-23 14:25:36 (GMT)
commit7c9c1c599dcc5ec902a46cc7b990fd27ee902c44 (patch)
tree1e469bf5e317b73adde8bfba9c1e45f57b1a6a23 /Source/cmSystemTools.cxx
parente74377dcd809d078f7d7a24dd2dedc7ed6ef986e (diff)
downloadCMake-7c9c1c599dcc5ec902a46cc7b990fd27ee902c44.zip
CMake-7c9c1c599dcc5ec902a46cc7b990fd27ee902c44.tar.gz
CMake-7c9c1c599dcc5ec902a46cc7b990fd27ee902c44.tar.bz2
ENH: handle // in the path
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 28163a8..a081b0c 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -702,6 +702,12 @@ void cmSystemTools::ConvertToUnixSlashes(std::string& path)
path[pos] = '/';
pos++;
}
+ // Remove all // from the path just like most unix shells
+ while((pos = path.find("//", 0)) != std::string::npos)
+ {
+ cmSystemTools::ReplaceString(path, "//", "/");
+ }
+
// remove any trailing slash
if(path.size() && path[path.size()-1] == '/')
{
@@ -1700,7 +1706,6 @@ void cmSystemTools::SplitProgramPath(const char* in_name,
dir = "";
}
}
-
if((dir != "") && !cmSystemTools::FileIsDirectory(dir.c_str()))
{
std::string oldDir = in_name;