From 04e97e82db43d085bfc73e8e46e52634aabe0d53 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sun, 29 Jul 2018 10:25:31 +0200 Subject: [PATCH] Use magic number for Adobe Air. --- Library/Homebrew/unpack_strategy/air.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/unpack_strategy/air.rb b/Library/Homebrew/unpack_strategy/air.rb index ff6ce25f21..eabcefbacf 100644 --- a/Library/Homebrew/unpack_strategy/air.rb +++ b/Library/Homebrew/unpack_strategy/air.rb @@ -5,7 +5,8 @@ module UnpackStrategy using Magic def self.can_extract?(path) - path.extname == ".air" + mime_type = "application/vnd.adobe.air-application-installer-package+zip" + path.magic_number.match?(/.{59}#{Regexp.escape(mime_type)}/) end def dependencies