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
{{ message }}
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.
Hello,
I am trying to append to an already existing archive with files. Browsing the docs and the repo I found new_append() and according to the PR #215 it should update the central directory header and make the new files available next to the already existing files in the archive.
Above is my test program. It should append the files from ./asdf/ to ./archive.zip. Executing it the first time works and doesn't crash. But when inspecting the archive with 7z l ./archive.zip I get a warning WARNINGS: There are data after the end of archive and the new files don't appear in the file listing. Running the above test program again it crashes with InvalidArchive("Invalid Central Directory header") on new_append(existing_zip).unwrap().
Am I using this API wrong, did I miss it's intented usage or is this a genuine bug. If the latter is the case, I'd be very happy to try and fix it (maybe with some guidance) or provide you with testcasts/do profiling and testing.
The text was updated successfully, but these errors were encountered:
I am pretty sure that append(true) is the wrong thing to do here: all writes to the file will happen at the end of the file, which is probably not what zip expects.
Can you try opening the file without this option ?
Hello,
I am trying to append to an already existing archive with files. Browsing the docs and the repo I found
new_append()
and according to the PR #215 it should update the central directory header and make the new files available next to the already existing files in the archive.Above is my test program. It should append the files from
./asdf/
to./archive.zip
. Executing it the first time works and doesn't crash. But when inspecting the archive with7z l ./archive.zip
I get a warningWARNINGS: There are data after the end of archive
and the new files don't appear in the file listing. Running the above test program again it crashes withInvalidArchive("Invalid Central Directory header")
onnew_append(existing_zip).unwrap()
.Am I using this API wrong, did I miss it's intented usage or is this a genuine bug. If the latter is the case, I'd be very happy to try and fix it (maybe with some guidance) or provide you with testcasts/do profiling and testing.
The text was updated successfully, but these errors were encountered: