Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[unzip] Issues on MacOS and Windows #7679

Open
nhz2 opened this issue Nov 15, 2023 · 0 comments
Open

[unzip] Issues on MacOS and Windows #7679

nhz2 opened this issue Nov 15, 2023 · 0 comments

Comments

@nhz2
Copy link
Contributor

nhz2 commented Nov 15, 2023

unzip_jll fails to unzip certain types of zip files on MacOS and Windows.
These files can be unzipped by the builtin unzip command and can also be unzipped by unzip_jll on Ubuntu.

I'm testing unzip_jll in JuliaIO/ZipArchives.jl#36

On Windows there seems to be some issue with UTF-8.

using ZipArchives
using unzip_jll
dir = mktempdir()
cd(dir)
ZipWriter("utf8.zip") do w
    zip_writefile(w, "🐨.txt", b"test")
end
run(`$(unzip()) utf8.zip -d out`)

On Windows this fails with the following error:

Archive:  utf8.zip
dY?".txt:  mismatching "local" filename (_.txt),
         continuing with "central" filename version
 extracting: out/dY?".txt  

and creates a file named "ðŸ\u90¨.txt"

On MacOS there seems to be some issue with zip64 support.

using ZipArchives
using unzip_jll
dir = mktempdir()
cd(dir)
open("files64.zip"; write=true) do io
    ZipWriter(io; force_zip64=true) do w
        zip_writefile(w, "test1.txt", b"test")
    end
end
run(`$(unzip()) files64.zip -d out`)

On MacOS this gives the error:

Archive:  files64.zip
   skipping: test1.txt               need PK compat. v4.5 (can do v2.1)

and doesn't create any files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant