ib / xarchiver

(continuation of the Xfce master branch)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Specific zip file doesn't open in xarchiver

jepler opened this issue · comments

I noticed that some zip files were not opening in xarchiver. While I encountered this in xarchiver 0.5.4.20 on Debian Bookworm I verified it in 0.5.4.21 built from github.

The file in question is an artifact produced by github actions
bundles.zip

It looks like the problem may be that unzip -Z -l shows "?" in the first column rather than "-":

Archive:  /home/jepler/Downloads/bundles.zip
Zip file size: 8948 bytes, number of entries: 6
?rw-r--r--  2.0 unx     6714 bl     1959 defN 23-May-31 15:42 jepler-circuitpython-udecimal-7.x-mpy-89ed628.zip
?rw-r--r--  2.0 unx     6714 bl     1957 defN 23-May-31 15:42 jepler-circuitpython-udecimal-8.x-mpy-89ed628.zip
?rw-r--r--  2.0 unx        2 bl        4 defN 23-May-31 15:42 jepler-circuitpython-udecimal-89ed628.json
?rw-r--r--  2.0 unx     6720 bl     1954 defN 23-May-31 15:42 jepler-circuitpython-udecimal-examples-89ed628.zip
?rw-r--r--  2.0 unx     6684 bl     1954 defN 23-May-31 15:42 jepler-circuitpython-udecimal-py-89ed628.zip
?rw-r--r--  2.0 unx        6 bl        8 defN 23-May-31 15:42 z-build_tools_version-1.10.3.ignore
6 files, 26840 bytes uncompressed, 7836 bytes compressed:  70.8%

unzip is from debian:

$ unzip --help
UnZip 6.00 of 20 April 2009, by Debian. Original by Info-ZIP.
$ apt policy unzip
unzip:
  Installed: 6.0-28
  Candidate: 6.0-28
  Version table:
 *** 6.0-28 500
        500 http://deb.debian.org/debian bookworm/main amd64 Packages
        100 /var/lib/dpkg/status

Your analysis is absolutely correct.

The patch

--- a/src/zip.c
+++ b/src/zip.c
@@ -77 +77 @@
-	if (line[0] != '-' && line[0] != 'd' && line[0] != 'l')
+	if (line[0] != '-' && line[0] != 'd' && line[0] != 'l' && line[0] != '?')

will be applied shortly.

thank you!