mirror of
https://github.com/Homebrew/brew.git
synced 2026-10-28 09:34:42 +08:00
Merge pull request #24331 from QuillVot/codex/dmg-desktop-metadata
dmg: skip legacy desktop metadata
This commit is contained in:
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" }
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user