diff --git a/doc/changelog.txt b/doc/changelog.txt index d0c323f..29c1024 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -2,7 +2,7 @@ * Configure the xz program to also extract LZMA files. * Fixed creation of LZMA files with the Python lzma module. -* Handle *.epub files as ZIP files. +* Handle *.epub and *.apk files as ZIP files. 1.6 (released 8.6.2014) diff --git a/patoolib/util.py b/patoolib/util.py index 5f13345..4f91d6f 100644 --- a/patoolib/util.py +++ b/patoolib/util.py @@ -130,6 +130,7 @@ def add_mimedb_data(mimedb): add_mimetype(mimedb, 'application/x-chm', '.chm') add_mimetype(mimedb, 'application/x-iso9660-image', '.iso') add_mimetype(mimedb, 'application/zip', '.epub') + add_mimetype(mimedb, 'application/zip', '.apk') def add_mimetype(mimedb, mimetype, extension): diff --git a/tests/archives/test_unzip.py b/tests/archives/test_unzip.py index 4939809..aa07970 100644 --- a/tests/archives/test_unzip.py +++ b/tests/archives/test_unzip.py @@ -31,6 +31,8 @@ class TestUnzip (ArchiveTest): self.archive_extract('t.epub', check=None) self.archive_list('t.epub') self.archive_test('t.epub') + self.archive_list('t.apk') + self.archive_test('t.apk') @needs_program('file') @needs_program(program) @@ -44,3 +46,5 @@ class TestUnzip (ArchiveTest): self.archive_extract('t.epub.foo', check=None) self.archive_list('t.epub.foo') self.archive_test('t.epub.foo') + self.archive_list('t.apk.foo') + self.archive_test('t.apk.foo') diff --git a/tests/data/t.apk b/tests/data/t.apk new file mode 100644 index 0000000..4e4b487 Binary files /dev/null and b/tests/data/t.apk differ diff --git a/tests/data/t.apk.foo b/tests/data/t.apk.foo new file mode 100644 index 0000000..4e4b487 Binary files /dev/null and b/tests/data/t.apk.foo differ diff --git a/tests/test_mime.py b/tests/test_mime.py index 117e5e9..64bab11 100644 --- a/tests/test_mime.py +++ b/tests/test_mime.py @@ -125,6 +125,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") @needs_program('file') @needs_program('lzip') @@ -200,3 +201,4 @@ class TestMime (unittest.TestCase): self.mime_test_mimedb("t.chm", "application/x-chm") self.mime_test_mimedb("t.iso", "application/x-iso9660-image") self.mime_test_mimedb("t.epub", "application/zip") + self.mime_test_mimedb("t.apk", "application/zip")