From 7c9c1c599dcc5ec902a46cc7b990fd27ee902c44 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Mon, 23 Dec 2002 09:25:36 -0500 Subject: [PATCH] ENH: handle // in the path --- Source/cmSystemTools.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 28163a881..a081b0c62 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;