From 058f51cd8674760cac8b7c0b04afa5915af9f667 Mon Sep 17 00:00:00 2001 From: Dwayne Boone Date: Tue, 7 Apr 2009 13:48:16 -0230 Subject: Bug 3832 - slice conmpiler issues with UNC paths --- cpp/src/Slice/Util.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cpp/src/Slice/Util.cpp') diff --git a/cpp/src/Slice/Util.cpp b/cpp/src/Slice/Util.cpp index dffbef6523b..916bebbea03 100644 --- a/cpp/src/Slice/Util.cpp +++ b/cpp/src/Slice/Util.cpp @@ -26,8 +26,9 @@ static string normalizePath(const string& path) { string result = path; + replace(result.begin(), result.end(), '\\', '/'); - string::size_type pos; + string::size_type startReplace = 0; #ifdef _WIN32 // @@ -39,6 +40,7 @@ normalizePath(const string& path) startReplace = 2; } #endif + string::size_type pos; while((pos = result.find("//", startReplace)) != string::npos) { result.replace(pos, 2, "/"); -- cgit v1.2.3