I found a problem while using the ported libzip 0.9.3 when creating a .zip file from within a ps3 homebrew app:
When you try to create an archive.zip, libzip ends up creating archive.zip.XXXXX (where XXXXX is a random extension)
I tracked down the issue back to the libzip source code, and fixed it. The libzip code creates a temp file and when it finishes, it tries to rename it to the desired filename, e.g. archive.zip.
The fix I made was to re-define the _zip_rename() to sysLv2FsRename() in ./libzip-0.9.3/lib/zipint.h:
This begs the question why simply calling rename() does not work. Surely this should be a wrapper for sysLv2FsRename() so that you don't need to do this in every lib or app?
I found a problem while using the ported libzip 0.9.3 when creating a
.zip
file from within a ps3 homebrew app: When you try to create anarchive.zip
, libzip ends up creatingarchive.zip.XXXXX
(where XXXXX is a random extension)I tracked down the issue back to the libzip source code, and fixed it. The libzip code creates a temp file and when it finishes, it tries to rename it to the desired filename, e.g.
archive.zip
.The fix I made was to re-define the
_zip_rename()
tosysLv2FsRename()
in./libzip-0.9.3/lib/zipint.h
:I don't know how to properly share this patch, so I'm attaching the whole
zipint.h
file to this issue: zipint.h.zip