diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2002-12-30 13:18:38 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2002-12-30 13:18:38 (GMT) |
commit | 6e4712d6ed606205f9ca4bb5aa2de8ad19c480a7 (patch) | |
tree | 12b73131fb98c3d7bb3b985b9fc07a42efff4bbb /Source/cmSystemTools.cxx | |
parent | 455b262cfeaedaa9f472e4f80160fd06d9331459 (diff) | |
download | CMake-6e4712d6ed606205f9ca4bb5aa2de8ad19c480a7.zip CMake-6e4712d6ed606205f9ca4bb5aa2de8ad19c480a7.tar.gz CMake-6e4712d6ed606205f9ca4bb5aa2de8ad19c480a7.tar.bz2 |
Fix problem on windows with network paths
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r-- | Source/cmSystemTools.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index a081b0c..e67708f 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -703,7 +703,15 @@ void cmSystemTools::ConvertToUnixSlashes(std::string& path) pos++; } // Remove all // from the path just like most unix shells - while((pos = path.find("//", 0)) != std::string::npos) + int start_find = 0; + +#ifdef _WIN32 + // However, on windows if the first characters are both slashes, + // then keep them that way, so that network paths can be handled. + start_find = 1; +#endif + + while((pos = path.find("//", start_find)) != std::string::npos) { cmSystemTools::ReplaceString(path, "//", "/"); } |