Browse Source

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
Brad King 9 years ago
parent
commit
52aecc0c38
1 changed files with 1 additions and 0 deletions
  1. 1 0
      Modules/ExternalProject.cmake

+ 1 - 0
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}\")