aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2018-08-30 15:57:37 -0700
committerRobert Schumacher <roschuma@microsoft.com>2018-08-30 15:57:37 -0700
commitcf1df56e0df7b5a97c30b6a75f910c20d0fb3692 (patch)
tree733c15c7412735fb0d21da4669ff7111e2cc95b3 /scripts
parente9f36a0e2734d9130217548387ad87f7f494d47d (diff)
downloadvcpkg-cf1df56e0df7b5a97c30b6a75f910c20d0fb3692.tar.gz
vcpkg-cf1df56e0df7b5a97c30b6a75f910c20d0fb3692.zip
[vcpkg_download_distfile] Apply workaround from #3399
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cmake/vcpkg_download_distfile.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/cmake/vcpkg_download_distfile.cmake b/scripts/cmake/vcpkg_download_distfile.cmake
index db3e45594..949036c88 100644
--- a/scripts/cmake/vcpkg_download_distfile.cmake
+++ b/scripts/cmake/vcpkg_download_distfile.cmake
@@ -68,7 +68,12 @@ function(vcpkg_download_distfile VAR)
set(downloaded_file_path ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME})
set(download_file_path_part "${DOWNLOADS}/temp/${vcpkg_download_distfile_FILENAME}")
- file(REMOVE_RECURSE "${DOWNLOADS}/temp")
+ # Works around issue #3399
+ if(IS_DIRECTORY "${DOWNLOADS}/temp")
+ file(REMOVE_RECURSE "${DOWNLOADS}/temp0")
+ file(RENAME "${DOWNLOADS}/temp" "${DOWNLOADS}/temp0")
+ file(REMOVE_RECURSE "${DOWNLOADS}/temp0")
+ endif()
file(MAKE_DIRECTORY "${DOWNLOADS}/temp")
function(test_hash FILE_PATH FILE_KIND CUSTOM_ERROR_ADVICE)