diff options
author | Berk Geveci <berk.geveci@kitware.com> | 2002-01-24 14:15:49 -0500 |
---|---|---|
committer | Berk Geveci <berk.geveci@kitware.com> | 2002-01-24 14:15:49 -0500 |
commit | 31561a7848d8c2b81ab2bc269e4b2c7e190402a7 (patch) | |
tree | 168f9b91b1b983d93110ae1f5556ad62050b35de /Source | |
parent | 8a4a39d568cff55831c4fad19d046c396896a2e5 (diff) | |
download | cmake-31561a7848d8c2b81ab2bc269e4b2c7e190402a7.tar.gz |
BUG: fix for network paths
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmSystemTools.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index b5add2cef1..ff61100a0c 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -504,10 +504,13 @@ const char *cmSystemTools::ConvertToWindowsSlashesAndCleanUp(std::string& path) { cmSystemTools::ConvertToWindowsSlashes(path); std::string::size_type pos = 0; - pos = 0; - while((pos = path.find("\\\\", pos)) != std::string::npos) + if(path.size() > 1) { - path.erase(pos, 1); + pos = 1; + while((pos = path.find("\\\\", pos)) != std::string::npos) + { + path.erase(pos, 1); + } } return path.c_str(); } |