Autolab icon indicating copy to clipboard operation
Autolab copied to clipboard

Jar archives are not displayed in speedgrader

Open jlge opened this issue 1 year ago • 2 comments

Zip directory contains .java files and a folder with a 'MANIFEST.MF' file, but fails to display in speedgrader view.

Current behavior Binary file not displayed for entire zip image

Expected behavior Should be able to view the zip directory structure with all of it's files

jlge avatar Sep 10 '24 18:09 jlge

More context:

While it may be the case that the viewer can't deal with binary files inside archives, this particular situation is caused by changes in the unix file command, used by the Archive.get_archive_type and Archive.archive? methods

libmagic now has many additional detectors for file formats that reuse the zip container format, including APKs, openoffice, epub, ios, and yes, files created with the jar tool. Files which match those detectors will not be shown as zip files or get the application/zip mimetype. See https://github.com/file/file/blob/master/magic/Magdir/archive#L1798-L2142 for the rules in question.

In particular, jar files will be labeled with the application/java-archive mimetype. IF autolab wants to support jar archives, this mimetype will need to be an alias for application/zip

20wildmanj avatar Sep 20 '24 19:09 20wildmanj

Tar archives with the "pax" format are also unable to be read (only "ustar" format as of right now). image

jlge avatar Nov 01 '24 21:11 jlge