View Issue Details

IDProjectCategoryView StatusLast Update
0000653fileGeneralpublic2025-05-08 20:10
Reporteronnimonni Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version5.41 
Summary0000653: Can't peak into zip archive which has JSON files inside
DescriptionHey,

I checked all arguments for 'file' and saw useful '-z' flag:

$ file --help
Usage: file [OPTION...] [FILE...]
Determine type of FILEs.

      --help display this help and exit
  -v, --version output version information and exit
  -m, --magic-file LIST use LIST as a colon-separated list of magic
                               number files
  -M LIST use LIST as a colon-separated list of magic
                               number files in place of default
 LIST use LIST as a colon-separated list of magic
                               number files in place of default
  -z, --uncompress try to look inside compressed files

I tried couple of different zip files which have json files inside of them. I can peak into them with MacOS finder or with `atool` but not with `file`.
Steps To ReproduceFirst visit https://api.zone.eu/v2 and click Download.

$ cd ~/Downloads
$ zip swagger.zip swagger.json
$ file swagger.zip
swagger.zip: Zip archive data, at least v2.0 to extract, compression method=deflate
$ file -z swagger.zip
swagger.zip: ERROR:[gzip: Unknown compression format] (Zip archive data, at least v2.0 to extract, compression method=deflate)
Additional InformationIt works well with gzipped archives and I thought that maybe it should for zip files too? Anyway thanks for maintaining this magnificent piece of software : ) !
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2025-05-08 20:10 onnimonni New Issue