diff --git a/.travis.yml b/.travis.yml index 6a6f447..313a48e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,12 +11,13 @@ branches: # install some archive programs before_install: - sudo apt-get update -qq - - sudo apt-get install -qq archmage arj bzip2 lbzip2 pbzip2 cabextract ncompress cpio bsdcpio lzop lcab p7zip p7zip-full zip unzip rpm2cpio binutils arc nomarch unalz lrzip bsdtar rzip zoo xdms orange lzip plzip clzip pdlzip sharutils flac unadf zoo zpaq libchm-bin genisoimage rpm + - sudo apt-get install -qq archmage arj bzip2 lbzip2 pbzip2 cabextract ncompress cpio bsdcpio lzop lcab p7zip p7zip-full zip unzip rpm2cpio binutils arc nomarch unalz lrzip bsdtar rzip zoo xdms lzip plzip clzip pdlzip sharutils flac unadf zoo zpaq libchm-bin genisoimage rpm # apt errors: #E: Package 'p7zip-rar' has no installation candidate #E: Package 'rar' has no installation candidate #E: Package 'unrar' has no installation candidate #E: Package 'lha' has no installation candidate +#E: Package 'orange' has no installation candidate #E: Unable to locate package unace-nonfree #E: Unable to locate package zopfli diff --git a/patoolib/__init__.py b/patoolib/__init__.py index f50d887..5aaf887 100644 --- a/patoolib/__init__.py +++ b/patoolib/__init__.py @@ -46,6 +46,7 @@ ArchiveCompressions = ('bzip2', 'compress', 'gzip', 'lzip', 'lzma', 'xz') # Map MIME types to archive format ArchiveMimetypes = { 'application/gzip': 'gzip', + 'application/jar': 'zip', # reported on older systems such as ubuntu 14.04 'application/java-archive': 'zip', 'application/rar': 'rar', 'application/vnd.ms-cab-compressed': 'cab', diff --git a/tests/test_mime.py b/tests/test_mime.py index c36d2d0..15f1c51 100644 --- a/tests/test_mime.py +++ b/tests/test_mime.py @@ -134,7 +134,7 @@ class TestMime (unittest.TestCase): self.mime_test_file("t.chm.foo", "application/x-chm") self.mime_test_file("t.iso", "application/x-iso9660-image") self.mime_test_file("t.epub", "application/zip") - self.mime_test_file("t.apk", ("application/zip", "application/java-archive")) + self.mime_test_file("t.apk", ("application/zip", "application/java-archive", "application/jar")) self.mime_test_file("t.zpaq", "application/zpaq") self.mime_test_file("t.zpaq.foo", "application/zpaq")