1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-04 14:30:11 +01:00

Fix: some apks have a zip mimetype instead of a jar one

This commit is contained in:
Daniel Martí 2014-04-15 17:50:08 +02:00
parent 5c483a5484
commit b92b722c6d

View File

@ -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)