Zareportoval som bug v Debiane – Midnight Commander a Java archive data (JAR)

mc-java-archive-data-JAR-2Ak sa vám stane, že mc neotvorí váš *.zip archív tak ako má, možno je chyba v súbore /etc/mc/mc.ext.. V Debiane som na túto špecifickú chybu narazil pri pokuse otvoriť nočný build CyanogenModu. Typ tohto súboru je Java archive data (JAR).

Vtedy spravte nasledovné: príkazom file skontrolujte typ súboru (hoci má príponu .zip)

$ file cm-11-20140308-NIGHTLY-n7000.zip
cm-11-20140308-NIGHTLY-n7000.zip: Java archive data (JAR)
$ unzip -v cm-11-20140308-NIGHTLY-n7000.zip | head -n 8
Archive:  cm-11-20140308-NIGHTLY-n7000.zip
signed by SignApk
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
     120  Defl:N      107  11% 2008-02-28 18:33 8b29fb58  META-INF/com/android/metadata
  283576  Defl:N   181169  36% 2008-02-28 18:33 4891be50  META-INF/com/google/android/update-binary
   15830  Defl:N     2515  84% 2008-02-28 18:33 78f05dcd  META-INF/com/google/android/updater-script
 5309736  Defl:N  5308837   0% 2008-02-28 18:33 62c090d0  boot.img
$ unzip -v cm-11-20140308-NIGHTLY-n7000.zip | tail -n 6
    1675  Defl:N      943  44% 2008-02-28 18:33 c3fc0954  META-INF/com/android/otacert
  108835  Defl:N    40515  63% 2008-02-28 18:33 5483e560  META-INF/MANIFEST.MF
  120201  Defl:N    40944  66% 2008-02-28 18:33 4799e3d4  META-INF/CERT.SF
    1714  Defl:N     1156  33% 2008-02-28 18:33 5042e700  META-INF/CERT.RSA
--------          -------  ---                            -------
326641835         200171497  39%                            1260 files

A doplňte do /etc/mc/mc.ext. podobné riadky:

# diff -c5 /etc/mc/mc.ext.orig /etc/mc/mc.ext
*** /etc/mc/mc.ext.orig	2014-03-09 22:00:25.140381127 +0100
--- /etc/mc/mc.ext	2014-03-09 22:00:28.200287542 +0100
***************
*** 688,697 ****
--- 688,702 ----
  # jar(zip)
  type/i/^Java\ Jar\ file\ data\ \(zip\)
  	Open=%cd %p/uzip://
  	View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view zip

+ # jar(zip)
+ type/i/^Java\ archive\ data\ \(JAR\)
+ 	Open=%cd %p/uzip://
+ 	View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view zip
+ 
  # zoo
  shell/i/.zoo
  	Open=%cd %p/uzoo://
  	View=%view{ascii} /usr/lib/mc/ext.d/archive.sh view zoo

Viď napr. môj bugreport v Debiane