You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use this zip implementation to distribute resource data as part of a fat executable, because it is cross platform and has no external dependencies.
Packing and appending the ZIP archive to the executable from Setup.hs works great, however unpacking the data at runtime from Main.hs fails with:
Parsing of archive structure failed:
Cannot locate end of central directory
in".stack-work/install/x86_64-osx/lts-11.6/8.2.2/bin/self-extracting-zip"
However, unzip reports:
% unzip -l .stack-work/install/x86_64-osx/lts-11.6/8.2.2/bin/self-extracting-zip
Archive: .stack-work/install/x86_64-osx/lts-11.6/8.2.2/bin/self-extracting-zip
warning [.stack-work/install/x86_64-osx/lts-11.6/8.2.2/bin/self-extracting-zip]: 2566816 extra bytes at beginning or within zipfile
(attempting to process anyway)
Length Date Time Name
--------- ---------- ----- ----
220 05-20-2018 13:49 app/Main.hs
--------- -------
220 1 file
The entire test project can be found here.
My question is, am I doing something wrong, or is this not a valid use case for the library?
Any help will be greatly appreciated.
The text was updated successfully, but these errors were encountered:
This usage is not supported right now. Zip uses offsets to specify start of file headers, and when you prepend something to zip archive these are no longer valid. unzip probably just knows how to detect size of data at the beginning and adjust the offsets automatically.
We can do it too, just need to sit down and implement. Not sure when I'll have time.
I am trying to use this zip implementation to distribute resource data as part of a fat executable, because it is cross platform and has no external dependencies.
Packing and appending the ZIP archive to the executable from
Setup.hs
works great, however unpacking the data at runtime fromMain.hs
fails with:However,
unzip
reports:The entire test project can be found here.
My question is, am I doing something wrong, or is this not a valid use case for the library?
Any help will be greatly appreciated.
The text was updated successfully, but these errors were encountered: