id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	branch_state	votes
4368	Problems viewing zip files	blacktav		"I am experiencing strange behaviour with some zip files

== a zip file built locally using zip 3.0 ==
In mc this behaves as expected: `view` opens a file list, `open` permits browsing the contents of the zip file (ie. using extfs uzip)

File type reported as
{{{
Kerryvanning.zip: Zip archive data, at least v1.0 to extract, compression method=store
}}}

== a download from Google's photo tool ==

`view`::
mc throws an error
{{{identify: no decode delegate for the image format `ZIP' @ error/constiture.c/ReadImage/737.}}}

`open`::
mc opens the file for browsing but in an external app triggering a call through xdg

File type is reported as:
{{{Photos-2016.zip: Zip archive data, at least v2.0 to extract, compression method=deflate}}}

== mc.ext ==
There are 2 definitions for zip files: one on the file extension {{{shell/i/.zip}}}, the other by type {{{type/\(Zip archive}}} although they both have the same commands and it does not matter which is triggered - behaviour is identical

ie. I removed one or other or both

== Conclusion & workaround ==
Given the `view` error message, it looks like the file is being interpreted as an `image` and handed off as appropriate

Commenting out the image type handlers in mc.ext (the JPG one in particular) and behaviour reverts to normal zip-file handling.

workaround::
Since the image types appear before compressed file detection, moving image detection to later in the `mc.ext` file produces normal behaviour

There must be some issue with the built-in file-type detection (the tested file does contain JPG images)
----

{{{
Home directory: /home/drew
Profile root directory: /home/drew

[System data]
    Config directory: /etc/mc/
    Data directory:   /usr/share/mc/
    File extension handlers: /usr/lib/mc/ext.d/
    VFS plugins and scripts: /usr/lib/mc/
	extfs.d:        /usr/lib/mc/extfs.d/
	fish:           /usr/lib/mc/fish/

[User data]
    Config directory: /home/drew/.config/mc/
    Data directory:   /home/drew/.local/share/mc/
	skins:          /home/drew/.local/share/mc/skins/
	extfs.d:        /home/drew/.local/share/mc/extfs.d/
	fish:           /home/drew/.local/share/mc/fish/
	mcedit macros:  /home/drew/.local/share/mc/mc.macros
	mcedit external macros: /home/drew/.local/share/mc/mcedit/macros.d/macro.*
    Cache directory:  /home/drew/.cache/mc/
 '--prefix=/usr' '--libexecdir=/usr/lib' '--sysconfdir=/etc' '--enable-vfs-smb' '--with-screen=slang' '--with-x' 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -flto=auto' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto'
}}}
"	defect	closed	major	4.8.29	mc-core	master	fixed					no branch	
