From b92b722c6d99cae11ffa1bd227698343fc3d6844 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Mart=C3=AD?= Date: Tue, 15 Apr 2014 17:50:08 +0200 Subject: [PATCH] Fix: some apks have a zip mimetype instead of a jar one --- fdroidserver/common.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fdroidserver/common.py b/fdroidserver/common.py index 6af904ae..e60cc6ca 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -1279,13 +1279,16 @@ def scan_source(build_dir, root_dir, thisbuild): count += handleproblem('binary executable', fd, fp) elif mime == 'application/x-java-applet': count += handleproblem('Java compiled class', fd, fp) - elif mime == 'application/jar' and has_extension(fp, 'apk'): + elif has_extension(fp, 'apk') and mime in ( + 'application/jar', + 'application/zip', + ): removeproblem('APK file', fd, fp) - elif has_extension(fp, 'jar') and mime in [ + elif has_extension(fp, 'jar') and mime in ( 'application/zip', 'application/java-archive', 'binary', - ]: + ): warnproblem('JAR file', fd) elif mime == 'application/zip': warnproblem('ZIP file', fd) -- 2.30.2