Erroneous path recognition in zip/unzip
Opened this issue · 4 comments
I recently tried zipping and unzipping some files on a-Shell.
However, the zip and unzip commands built for the application seems not to properly deal with the path parameters.
Provided a path description relative to the current location, zip cannot locate any files. Only the relative path from ~ are recognised. It is so for unzip command.
Even if an archive is created with such parameters, the files are archived inside ‘private/var/mobile/Containers/Data/Application/…’ in the archive file; that is, the directory structure starts from the very root. And such state of organisation keeps the files from being extracted.
This behaviour is considered limited to the version for a-Shell. I hope this issue is checked and fixed.
That's weird, but I can definitely reproduce the issue. In a quick test, it seems you can fix the issue by renaming ~/Documents/bin/zip.wasm
to ~/Documents/bin/zip.wasm3
(and same for unzip.wasm
).
That quick fix should allow you to keep working while I dig deeper into the issue.
Hi again,
in that case, the fastest solution was to update the "zip" package. Re-install it with "pkg install zip", you should now have a file named zip.wasm3
in ~/Documents/bin
. That one should work with the latest version of a-Shell.
Still not working for me:
[~/Documents]$ pkg install zip
Downloading zip
Downloading funzip
Downloading unzip
Downloading unzipsfx
Downloading zip
Downloading zipcloak
Downloading zipnote
Downloading zipsplit
Done
[~/Documents]$ zip z.zip .toolbarDefinition
adding: .toolbarDefinition (deflated 57%)
zip warning: new zip file left as: ziHGPDKb
zip I/O error: Invalid argument
zip error: Could not create output file (was replacing the original zip file)
[~/Documents]$
There was no existing "z.zip" file in the folder. Why is it trying to replace something that does not exist? It seems to create the zip file, but it cannot rename it due to some I/O error.
Indeed. The fix will be in a combination of a new release (to fix things in the Wasm interpreter) and new binaries (to be installed with "pkg", to fix things that had changed).