diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2009-04-07 13:48:16 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2009-04-07 13:48:16 -0230 |
commit | 058f51cd8674760cac8b7c0b04afa5915af9f667 (patch) | |
tree | f7c9f6039aa2795222e7dbfc0a7babab13e2dee9 /cpp/src/Slice/Preprocessor.cpp | |
parent | updating CHANGES for bug 3739 (diff) | |
download | ice-058f51cd8674760cac8b7c0b04afa5915af9f667.tar.bz2 ice-058f51cd8674760cac8b7c0b04afa5915af9f667.tar.xz ice-058f51cd8674760cac8b7c0b04afa5915af9f667.zip |
Bug 3832 - slice conmpiler issues with UNC paths
Diffstat (limited to 'cpp/src/Slice/Preprocessor.cpp')
-rw-r--r-- | cpp/src/Slice/Preprocessor.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/cpp/src/Slice/Preprocessor.cpp b/cpp/src/Slice/Preprocessor.cpp index 29c968f9f93..ca2c2827dc6 100644 --- a/cpp/src/Slice/Preprocessor.cpp +++ b/cpp/src/Slice/Preprocessor.cpp @@ -89,8 +89,19 @@ Slice::Preprocessor::normalizeIncludePath(const string& path) replace(result.begin(), result.end(), '\\', '/'); + string::size_type startReplace = 0; +#ifdef _WIN32 + // + // For UNC paths we need to ensure they are in the format that is + // used by MCPP. IE. "//MACHINE/PATH" + // + if(result.find("//") == 0) + { + startReplace = 2; + } +#endif string::size_type pos; - while((pos = result.find("//")) != string::npos) + while((pos = result.find("//", startReplace)) != string::npos) { result.replace(pos, 2, "/"); } |