id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	branch_state	votes
3383	slow open of zip files if unzip points to unzip-rcc (use unzip-plain as workaround)	mcguard		"On my opensuse-13.1 system the contents of ZIP files appears
almost always after several seconds delay.

After inspecting strace log and playing with uzip I discovered the

  **reason:**  mc calls __unzip-rcc__ which seems to cause a delay if piped from uzip

  **workaround:**  use __unzip-plain__ instead, it works without delay

  **request:**  uzip works with unzip-rcc binary


== Details: ==

I have unzip* and unzip-rcc* rpms installed.
unzip-rcc handles non-ascii chars in filenames (? or so).
There are two unzip-binaries in /usr/bin : unzip-plain and unzip-rcc.
The link /usr/bin/unzip -> /etc/alternatives/unzip -> /usr/bin/unzip-rcc

The line in /usr/lib/mc/extfs.d/uzip
   `my $app_unzip = ""/usr/bin/unzip"";`
means uzip uses unzip-rcc which seems to cause a delay (not always, but often;
strace shows ~10 sec due to timeout after broken pipe error).
After changing unzip-rcc to unzip-plain the delay disappears.

For **workaround** you can either
  change the line in /usr/lib/mc/extfs.d/uzip
  `my $app_unzip = ""/usr/bin/unzip-plain"";`
or
  redirect the link /etc/alternatives/unzip to /usr/bin/unzip-plain


-----------------
== To reproduce: ==

1. check, if /usr/bin/unzip points to unzip-rcc
2. get a zip file somewhere, I used
       srock2.zip  <--  wget  srock2.zipwww.unige.ch/~vilmart/srock2.zip
3. to see the effect it is enough to run uzip (I used one from mc version 4.8.11)
       `/usr/lib/mc/extfs.d/uzip   list   srock2.zip`
   the contents of the zip file is listed fast,
   but the prompt comes often after noticeable delay.
   The problem is in 
       sub mczipfs_list { ...if ($op_has_zipinfo) { while (<PIPE>) {...} <--blocker
   uzip waits at closing } of the while loop after all output lines are printed.
   There is no delay, if unzip-plain is used.
   I cannot say more,  sorry, perl is not my world... 

"	defect	closed	major		mc-vfs	master	wontfix	uzip, slow open, unzip-rcc				no branch	
