diff --git a/src/vcpkg/base/downloads.cpp b/src/vcpkg/base/downloads.cpp index 21cf9363e4..9b9332c963 100644 --- a/src/vcpkg/base/downloads.cpp +++ b/src/vcpkg/base/downloads.cpp @@ -786,6 +786,10 @@ namespace vcpkg } } #endif + // Create directory in advance, otherwise curl will create it in 750 mode on unix style file systems. + const auto dir = download_path_part_path.parent_path(); + fs.create_directories(dir, VCPKG_LINE_INFO); + auto cmd = Command{"curl"} .string_arg("--fail") .string_arg("-L")