Merge pull request #24331 from QuillVot/codex/dmg-desktop-metadata

dmg: skip legacy desktop metadata
This commit is contained in:
Mike McQuaid authored and GitHub committed 2026-10-23 18:14:55 +00:00
commit 6071b1f1bb
2 files changed
+20

No files matched your search

@@ -4,6 +4,24 @@
require_relative "shared_examples"
RSpec.describe UnpackStrategy::Dmg, :needs_macos do
describe UnpackStrategy::Dmg::Bom do
it "ignores Desktop DB at the volume root" do
expect(described_class.dmg_metadata?(Pathname("./Desktop DB"))).to be true
end
it "ignores Desktop DF at the volume root" do
expect(described_class.dmg_metadata?(Pathname("./Desktop DF"))).to be true
end
it "preserves Desktop DB inside an application" do
expect(described_class.dmg_metadata?(Pathname("Example.app/Contents/Resources/Desktop DB"))).to be false
end
it "preserves Desktop DF inside an application" do
expect(described_class.dmg_metadata?(Pathname("Example.app/Contents/Resources/Desktop DF"))).to be false
end
end
describe "#mount" do
subject(:path) { TEST_FIXTURE_DIR/"cask/container.dmg" }
+2
View File
@@ -31,6 +31,8 @@ module UnpackStrategy
".VolumeIcon.icns",
".HFS+ Private Directory Data\r", # do not remove `\r`, it is a part of directory name
".HFS+ Private Data\r",
"Desktop DB",
"Desktop DF",
]).freeze, T::Set[String])
private_constant :DMG_METADATA