diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2009-03-12 12:43:06 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2009-03-12 12:43:06 -0230 |
commit | c0f007882e74fbc55683a3eec7c77b6187eb91cf (patch) | |
tree | d8e6bd32c4c3dbb1a213e63620b4be666691c221 /cpp/src/Slice/Util.cpp | |
parent | bug 3830 - CHANGES review (diff) | |
download | ice-c0f007882e74fbc55683a3eec7c77b6187eb91cf.tar.bz2 ice-c0f007882e74fbc55683a3eec7c77b6187eb91cf.tar.xz ice-c0f007882e74fbc55683a3eec7c77b6187eb91cf.zip |
Bug 3832 - fix slice compilation of UNC files
Diffstat (limited to 'cpp/src/Slice/Util.cpp')
-rw-r--r-- | cpp/src/Slice/Util.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cpp/src/Slice/Util.cpp b/cpp/src/Slice/Util.cpp index 033e21384aa..a4a21e50efa 100644 --- a/cpp/src/Slice/Util.cpp +++ b/cpp/src/Slice/Util.cpp @@ -28,7 +28,14 @@ normalizePath(const string& path) string result = path; replace(result.begin(), result.end(), '\\', '/'); string::size_type pos; - while((pos = result.find("//")) != string::npos) + string::size_type startReplace = 0; +#ifdef _WIN32 + if(result.find("//") == 0) + { + startReplace = 2; + } +#endif + while((pos = result.find("//", startReplace)) != string::npos) { result.replace(pos, 2, "/"); } |