diff options
author | Feng Xiao <xfxyjwf@gmail.com> | 2015-05-26 21:29:29 -0700 |
---|---|---|
committer | Feng Xiao <xfxyjwf@gmail.com> | 2015-05-26 21:33:46 -0700 |
commit | b11d6fe515873591907bcce592ed86757c3d7cf3 (patch) | |
tree | 267b529c142790ea003b1fb38a218b46b9c4750f /src | |
parent | 9250fbaead7ff5208697d57859ac8e8fd2721786 (diff) | |
download | protobuf-b11d6fe515873591907bcce592ed86757c3d7cf3.tar.gz protobuf-b11d6fe515873591907bcce592ed86757c3d7cf3.tar.bz2 protobuf-b11d6fe515873591907bcce592ed86757c3d7cf3.zip |
Replace "\\" with "/" for windows path names.
Diffstat (limited to 'src')
-rw-r--r-- | src/google/protobuf/testing/googletest.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/google/protobuf/testing/googletest.cc b/src/google/protobuf/testing/googletest.cc index 5f6a199a..64328063 100644 --- a/src/google/protobuf/testing/googletest.cc +++ b/src/google/protobuf/testing/googletest.cc @@ -108,6 +108,10 @@ string GetTemporaryDirectoryName() { if (HasPrefixString(result, "\\")) { result.erase(0, 1); } + // The Win32 API accepts forward slashes as a path delimiter even though + // backslashes are standard. Let's avoid confusion and use only forward + // slashes. + result = StringReplace(result, "\\", "/", true); #endif // _WIN32 return result; } |