diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/cmake/vcpkg_download_distfile.cmake | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake index 1fbff40e5..887eb285f 100644 --- a/scripts/cmake/vcpkg_download_distfile.cmake +++ b/scripts/cmake/vcpkg_download_distfile.cmake @@ -75,11 +75,14 @@ function(vcpkg_download_distfile VAR) # Works around issue #3399 if(IS_DIRECTORY "${DOWNLOADS}/temp") + # Delete "temp0" directory created by the old version of vcpkg file(REMOVE_RECURSE "${DOWNLOADS}/temp0") - file(RENAME "${DOWNLOADS}/temp" "${DOWNLOADS}/temp0") - file(REMOVE_RECURSE "${DOWNLOADS}/temp0") + + file(GLOB temp_files "${DOWNLOADS}/temp") + file(REMOVE_RECURSE ${temp_files}) + else() + file(MAKE_DIRECTORY "${DOWNLOADS}/temp") endif() - file(MAKE_DIRECTORY "${DOWNLOADS}/temp") function(test_hash FILE_PATH FILE_KIND CUSTOM_ERROR_ADVICE) if(_VCPKG_INTERNAL_NO_HASH_CHECK) |
