diff options
author | 2017-02-01 16:32:08 +0000 | |
---|---|---|
committer | 2017-02-01 16:36:58 +0000 | |
commit | 8bebcec47848b5129e0ce41fd4c3ee8a79ba7600 (patch) | |
tree | efa477e5fd57ebf68b56981258aca2ca478b6d8b /src/main/cpp/util/file_posix.cc | |
parent | efe3bf98b0430497ea1926b80e6dbb0b3642eac6 (diff) |
Rollback of commit 855fbe9ee447b7b37fd8c73dbc047d69b7ceffcf.
*** Reason for rollback ***
Causing bazel server restart every time on Windows
See https://github.com/bazelbuild/bazel/issues/2466
*** Original change description ***
Bazel client: platform-specific JoinPath
This allows joining paths on "\" instead of "/"
when building for Windows.
See https://github.com/bazelbuild/bazel/issues/2107
--
PiperOrigin-RevId: 146246700
MOS_MIGRATED_REVID=146246700
Diffstat (limited to 'src/main/cpp/util/file_posix.cc')
-rw-r--r-- | src/main/cpp/util/file_posix.cc | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/main/cpp/util/file_posix.cc b/src/main/cpp/util/file_posix.cc index 57c994a3ff..a1d806a9d9 100644 --- a/src/main/cpp/util/file_posix.cc +++ b/src/main/cpp/util/file_posix.cc @@ -168,35 +168,6 @@ IPipe* CreatePipe() { return new PosixPipe(fd[0], fd[1]); } -string JoinPath(const string &path1, const string &path2) { - if (path1.empty()) { - // "" + "/bar" - return path2; - } - if (path2.empty()) { - // "foo/" + "" - return path1; - } - - if (path1.back() == '/') { - if (path2.front() == '/') { - // foo/ + /bar - return path1 + path2.substr(1); - } else { - // foo/ + bar - return path1 + path2; - } - } else { - if (path2.front() == '/') { - // foo + /bar - return path1 + path2; - } else { - // foo + bar - return path1 + "/" + path2; - } - } -} - pair<string, string> SplitPath(const string &path) { size_t pos = path.rfind('/'); |