diff options
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, "/"); } |