|
44 | 44 | "application/gzip-compressed", "application/x-gzip-compressed",
|
45 | 45 | "gzip/document")
|
46 | 46 | sevenZ = newMIME("application/x-7z-compressed", ".7z", magic.SevenZ)
|
47 |
| - zip = newMIME("application/zip", ".zip", magic.Zip, xlsx, docx, pptx, epub, jar, odt, ods, odp, odg, odf, odc, sxc). |
| 47 | + // APK must be checked before JAR because APK is a subset of JAR. |
| 48 | + // This means APK should be a child of JAR detector, but in practice, |
| 49 | + // the decisive signature for JAR might be located at the end of the file |
| 50 | + // and not reachable because of library readLimit. |
| 51 | + zip = newMIME("application/zip", ".zip", magic.Zip, xlsx, docx, pptx, epub, apk, jar, odt, ods, odp, odg, odf, odc, sxc). |
48 | 52 | alias("application/x-zip", "application/x-zip-compressed")
|
49 | 53 | tar = newMIME("application/x-tar", ".tar", magic.Tar)
|
50 | 54 | xar = newMIME("application/x-xar", ".xar", magic.Xar)
|
|
57 | 61 | pptx = newMIME("application/vnd.openxmlformats-officedocument.presentationml.presentation", ".pptx", magic.Pptx)
|
58 | 62 | epub = newMIME("application/epub+zip", ".epub", magic.Epub)
|
59 | 63 | jar = newMIME("application/jar", ".jar", magic.Jar)
|
| 64 | + apk = newMIME("application/vnd.android.package-archive", ".apk", magic.APK) |
60 | 65 | ole = newMIME("application/x-ole-storage", "", magic.Ole, msi, aaf, msg, xls, pub, ppt, doc)
|
61 | 66 | msi = newMIME("application/x-ms-installer", ".msi", magic.Msi).
|
62 | 67 | alias("application/x-windows-installer", "application/x-msi")
|
|
0 commit comments