[diffoscope] 01/01: apk: Extend recognition regex to also match zip archives
Reiner Herrmann
reiner at reiner-h.de
Thu Dec 29 19:29:37 CET 2016
This is an automated email from the git hooks/post-receive script.
deki-guest pushed a commit to branch master
in repository diffoscope.
commit 2b4a5c4e0dbf35e6896aefdad5e3f9b54bcb593f
Author: Reiner Herrmann <reiner at reiner-h.de>
Date: Thu Dec 29 19:03:05 2016 +0100
apk: Extend recognition regex to also match zip archives
libmagic sometimes misdetects apk files as zip archives.
Closes: #849638
---
diffoscope/comparators/apk.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/diffoscope/comparators/apk.py b/diffoscope/comparators/apk.py
index f9f6613..d8f8ca4 100644
--- a/diffoscope/comparators/apk.py
+++ b/diffoscope/comparators/apk.py
@@ -58,7 +58,7 @@ class ApkContainer(Archive):
return src_path
class ApkFile(File):
- RE_FILE_TYPE = re.compile(r'^Java archive data .*\b')
+ RE_FILE_TYPE = re.compile(r'^(Java|Zip) archive data.*\b')
RE_FILE_EXTENSION = re.compile(r'\.apk$')
CONTAINER_CLASS = ApkContainer
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the diffoscope
mailing list