diff options
author | liujisi@google.com <liujisi@google.com@630680e5-0e50-0410-840e-4b1c322b438d> | 2010-12-07 06:23:55 +0000 |
---|---|---|
committer | liujisi@google.com <liujisi@google.com@630680e5-0e50-0410-840e-4b1c322b438d> | 2010-12-07 06:23:55 +0000 |
commit | 1fd96c43a01ec913a89de31c58c0bc9f1e5bf542 (patch) | |
tree | fd75a0bffe10b1e57155cbf70d32d41e44302be0 /src/google/protobuf/compiler/importer.cc | |
parent | b4d64bf7f3aa65318a5262977e59f42595c4c5d0 (diff) | |
download | protobuf-1fd96c43a01ec913a89de31c58c0bc9f1e5bf542.tar.gz protobuf-1fd96c43a01ec913a89de31c58c0bc9f1e5bf542.tar.bz2 protobuf-1fd96c43a01ec913a89de31c58c0bc9f1e5bf542.zip |
Add new files for vcprojs, fix issues: 165, 211, 228, 240
Diffstat (limited to 'src/google/protobuf/compiler/importer.cc')
-rw-r--r-- | src/google/protobuf/compiler/importer.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/google/protobuf/compiler/importer.cc b/src/google/protobuf/compiler/importer.cc index 7689ce93..422f759f 100644 --- a/src/google/protobuf/compiler/importer.cc +++ b/src/google/protobuf/compiler/importer.cc @@ -231,7 +231,12 @@ static string CanonicalizePath(string path) { // The Win32 API accepts forward slashes as a path delimiter even though // backslashes are standard. Let's avoid confusion and use only forward // slashes. - path = StringReplace(path, "\\", "/", true); + if (HasPrefixString(path, "\\\\")) { + // Avoid converting two leading backslashes. + path = "\\\\" + StringReplace(path.substr(2), "\\", "/", true); + } else { + path = StringReplace(path, "\\", "/", true); + } #endif vector<string> parts; |