From 52aecc0c382384d5bea3c18d7894e80bc573d8d7 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 1 Aug 2016 11:49:17 -0400 Subject: [PATCH] ExternalProject: Ignore macOS .DS_Store files in tarball extraction Do not consider a top-level `.DS_Store` file when deciding whether a tarball contains exactly one directory whose contents should be used as the resulting top-level of the extraction. Fixes #16218. Suggested-by: Patrice Kouame --- Modules/ExternalProject.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index 7e179aa68..4929848db 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -993,6 +993,7 @@ endif() # message(STATUS \"extracting... [analysis]\") file(GLOB contents \"\${ut_dir}/*\") +list(REMOVE_ITEM contents \"\${ut_dir}/.DS_Store\") list(LENGTH contents n) if(NOT n EQUAL 1 OR NOT IS_DIRECTORY \"\${contents}\") set(contents \"\${ut_dir}\")