Merge pull request #19526 from botantony/dmg-unpack

unpack `.dmg`: ignore `.HFS+ Private*` metadata directories
This commit is contained in:
Mike McQuaid 2025-03-18 12:10:19 +00:00 committed by GitHub
commit 3e5f7b95a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 12 deletions

View File

@ -14,18 +14,20 @@ module UnpackStrategy
module Bom
extend SystemCommand::Mixin
DMG_METADATA = T.let(Set.new(%w[
.background
.com.apple.timemachine.donotpresent
.com.apple.timemachine.supported
.DocumentRevisions-V100
.DS_Store
.fseventsd
.MobileBackups
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
DMG_METADATA = T.let(Set.new([
".background",
".com.apple.timemachine.donotpresent",
".com.apple.timemachine.supported",
".DocumentRevisions-V100",
".DS_Store",
".fseventsd",
".MobileBackups",
".Spotlight-V100",
".TemporaryItems",
".Trashes",
".VolumeIcon.icns",
".HFS+ Private Directory Data\r", # do not remove `\r`, it is a part of directory name
".HFS+ Private Data\r",
]).freeze, T::Set[String])
private_constant :DMG_METADATA