From bc52a18a16d378193fd18a76fb58cc5e50414e37 Mon Sep 17 00:00:00 2001 From: pcloudy Date: Fri, 6 Jul 2018 02:13:05 -0700 Subject: windows,launcher: Rlocation function now handles absolute paths correctly Fix https://github.com/bazelbuild/bazel/issues/5516 RELNOTES: None PiperOrigin-RevId: 203448188 --- src/tools/launcher/launcher.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/tools') 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; -- cgit v1.2.3