unpack .dmg: ignore .HFS+ Private* metadata directories

Signed-off-by: botantony <antonsm21@gmail.com>
This commit is contained in:
botantony 2025-03-18 11:49:45 +01:00
parent 9a62e88bda
commit d3cfc3d193
No known key found for this signature in database
GPG Key ID: 7FE721557EA6AAD6
2 changed files with 14 additions and 12 deletions

View File

@ -14,18 +14,20 @@ module UnpackStrategy
module Bom module Bom
extend SystemCommand::Mixin extend SystemCommand::Mixin
DMG_METADATA = T.let(Set.new(%w[ DMG_METADATA = T.let(Set.new([
.background ".background",
.com.apple.timemachine.donotpresent ".com.apple.timemachine.donotpresent",
.com.apple.timemachine.supported ".com.apple.timemachine.supported",
.DocumentRevisions-V100 ".DocumentRevisions-V100",
.DS_Store ".DS_Store",
.fseventsd ".fseventsd",
.MobileBackups ".MobileBackups",
.Spotlight-V100 ".Spotlight-V100",
.TemporaryItems ".TemporaryItems",
.Trashes ".Trashes",
.VolumeIcon.icns ".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]) ]).freeze, T::Set[String])
private_constant :DMG_METADATA private_constant :DMG_METADATA