CurlDownloadStrategy: fix .rar detection
We now read six bytes instead of four in order to detect xz compression; this broke rar detection which used a string literal instead of a regexp for comparison. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
parent
07e24dda76
commit
cd4428bcb9
@ -96,7 +96,7 @@ class CurlDownloadStrategy < AbstractDownloadStrategy
|
||||
when '____pkg'
|
||||
safe_system '/usr/sbin/pkgutil', '--expand', @tarball_path, File.basename(@url)
|
||||
chdir
|
||||
when 'Rar!'
|
||||
when /Rar!/
|
||||
quiet_safe_system 'unrar', 'x', {:quiet_flag => '-inul'}, @tarball_path
|
||||
else
|
||||
# we are assuming it is not an archive, use original filename
|
||||
|
Loading…
x
Reference in New Issue
Block a user