From 06c647e11a21dd4c193e63968e1d3f9024e05996 Mon Sep 17 00:00:00 2001 From: Tobias Funk <65156839+TobiasFunk@users.noreply.github.com> Date: Mon, 11 May 2020 23:54:47 +0200 Subject: [PATCH] =?UTF-8?q?[vcpkg]=20Resolve=20--overlay-ports=20is=20only?= =?UTF-8?q?=20working=20for=20relative=20parths=20since=20fix=E2=80=A6=20(?= =?UTF-8?q?#11302)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Resolve --overlay-ports is only working for relative parths since fix for https://github.com/microsoft/vcpkg/issues/10771 Fixes https://github.com/microsoft/vcpkg/issues/11301 * use auto instead of fs::path --- toolsrc/src/vcpkg/portfileprovider.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/toolsrc/src/vcpkg/portfileprovider.cpp b/toolsrc/src/vcpkg/portfileprovider.cpp index 975cd50a8..afb213784 100644 --- a/toolsrc/src/vcpkg/portfileprovider.cpp +++ b/toolsrc/src/vcpkg/portfileprovider.cpp @@ -35,7 +35,15 @@ namespace vcpkg::PortFileProvider { if (!overlay_path.empty()) { - auto overlay = fs.canonical(VCPKG_LINE_INFO, paths.original_cwd / fs::u8path(overlay_path)); + auto overlay = fs::u8path(overlay_path); + if (overlay.is_absolute()) + { + overlay = fs.canonical(VCPKG_LINE_INFO, overlay); + } + else + { + overlay = fs.canonical(VCPKG_LINE_INFO, paths.original_cwd / overlay); + } Debug::print("Using overlay: ", overlay.u8string(), "\n");