chiark / gitweb /
Some JARs have zip mimetype
authorDaniel Martí <mvdan@mvdan.cc>
Tue, 18 Feb 2014 15:16:46 +0000 (16:16 +0100)
committerDaniel Martí <mvdan@mvdan.cc>
Tue, 18 Feb 2014 15:16:46 +0000 (16:16 +0100)
fdroidserver/common.py

index 388a65f5a137a9a2a501c4a9a5f20ce9f959554a..6d7dca14f7e87b9993fcbad4b0e85b67bb23f1e9 100644 (file)
@@ -1211,7 +1211,8 @@ def scan_source(build_dir, root_dir, thisbuild):
                 handleproblem('Java compiled class', fd, fp)
             elif mime == 'application/jar' and has_extension(fp, 'apk'):
                 removeproblem('APK file', fd, fp)
-            elif mime == 'application/jar':
+            elif mime == 'application/jar' or (
+                    mime == 'application/zip' and has_extension(fp, 'jar')):
                 warnproblem('JAR file', fd, fp)
             elif mime == 'application/zip':
                 warnproblem('ZIP file', fd, fp)