From 26d02b2b14d7e3e1e21516241b6b64f3f9563cec Mon Sep 17 00:00:00 2001 From: Thomas Heinrichs <46387399+Thomas1664@users.noreply.github.com> Date: Tue, 7 Jun 2022 18:25:30 +0200 Subject: [PATCH 1/2] Also check if CONTROL is a file --- src/vcpkg/paragraphs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vcpkg/paragraphs.cpp b/src/vcpkg/paragraphs.cpp index c0ccfdf614..21fcdd80a5 100644 --- a/src/vcpkg/paragraphs.cpp +++ b/src/vcpkg/paragraphs.cpp @@ -420,7 +420,7 @@ namespace vcpkg::Paragraphs else { vcpkg::Checks::check_exit(VCPKG_LINE_INFO, - !fs.exists(control_path, IgnoreErrors{}), + !(fs.exists(control_path, IgnoreErrors{}) && fs.is_regular_file(control_path)), "Found both manifest and CONTROL file in port %s; please rename one or the other", port_directory); From 7ad3dd0d56eb28920d7936c9b1d1d472de08012f Mon Sep 17 00:00:00 2001 From: Thomas1664 <46387399+Thomas1664@users.noreply.github.com> Date: Tue, 7 Jun 2022 21:17:48 +0200 Subject: [PATCH 2/2] is_regular_file implies that it exists. Co-authored-by: Billy O'Neal --- src/vcpkg/paragraphs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vcpkg/paragraphs.cpp b/src/vcpkg/paragraphs.cpp index 21fcdd80a5..77a7a19687 100644 --- a/src/vcpkg/paragraphs.cpp +++ b/src/vcpkg/paragraphs.cpp @@ -420,7 +420,7 @@ namespace vcpkg::Paragraphs else { vcpkg::Checks::check_exit(VCPKG_LINE_INFO, - !(fs.exists(control_path, IgnoreErrors{}) && fs.is_regular_file(control_path)), + !fs.is_regular_file(control_path), "Found both manifest and CONTROL file in port %s; please rename one or the other", port_directory);