summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/Util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Slice/Util.cpp')
-rw-r--r--cpp/src/Slice/Util.cpp9
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, "/");
}