BUG: fix for network paths

This commit is contained in:
Berk Geveci 2002-01-24 14:15:49 -05:00
parent 8a4a39d568
commit 31561a7848
1 changed files with 6 additions and 3 deletions

View File

@ -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();
}