diff options
author | pcloudy <pcloudy@google.com> | 2018-07-06 02:13:05 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-07-06 02:14:47 -0700 |
commit | bc52a18a16d378193fd18a76fb58cc5e50414e37 (patch) | |
tree | 2cf802eb597afa82d0dfd1461fac786e396e1f71 /src/tools | |
parent | ab1f269017171223932e0da9bb539e8a17dd99ed (diff) |
windows,launcher: Rlocation function now handles absolute paths correctly
Fix https://github.com/bazelbuild/bazel/issues/5516
RELNOTES: None
PiperOrigin-RevId: 203448188
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/launcher/launcher.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/tools/launcher/launcher.cc b/src/tools/launcher/launcher.cc index b663c2cc77..e1a96ab40a 100644 --- a/src/tools/launcher/launcher.cc +++ b/src/tools/launcher/launcher.cc @@ -139,13 +139,14 @@ void BinaryLauncherBase::ParseManifestFile(ManifestFileMap* manifest_file_map, wstring BinaryLauncherBase::Rlocation(const wstring& path, bool need_workspace_name) const { + // No need to do rlocation if the path is absolute. + if (blaze_util::IsAbsolute(path)) { + return path; + } + // If the manifest file map is empty, then we're using the runfiles directory // instead. if (manifest_file_map.empty()) { - if (blaze_util::IsAbsolute(path)) { - return path; - } - wstring query_path = runfiles_dir; if (need_workspace_name) { query_path += L"/" + this->workspace_name; |