From 0845f915762ee85c319037181010836f0d09499d Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Fri, 21 Mar 2025 17:01:42 -0700 Subject: [PATCH] Turns out DOWNLOADS might not exist after all. --- scripts/cmake/vcpkg_download_distfile.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake index 723612b8461461..1466ea6ceff929 100644 --- a/scripts/cmake/vcpkg_download_distfile.cmake +++ b/scripts/cmake/vcpkg_download_distfile.cmake @@ -47,10 +47,10 @@ If you do not know the SHA512, add it as 'SHA512 0' and retry.") set(downloaded_file_path "${DOWNLOADS}/${arg_FILENAME}") - # We can assume DOWNLOADS already exists if we are running, but `arg_FILENAME` may have /s in it - # where the caller expects subdirectories to be created. get_filename_component(directory_component "${arg_FILENAME}" DIRECTORY) - if (NOT "${directory_component}" STREQUAL "") + if ("${directory_component}" STREQUAL "") + file(MAKE_DIRECTORY "${DOWNLOADS}") + else() file(MAKE_DIRECTORY "${DOWNLOADS}/${directory_component}") endif()