Conversation
|
@Graeme-Miller Can you provide steps to re-produce ... does this happen for every uploaded zip? |
|
Does it matter that we will lose all the information from ZipEntry apart from the file name? |
|
Can you provide steps to re-produce Even though go creates the zip correctly, brooklyn is unable to copy it due to a mismatch between the amount of compressed bytes the zipfile created by go is reporting, and the zipfile created by java is reporting. This is likely due a difference between the algorithms go and java use. does this happen for every uploaded zip |
|
@drigodwin no, it doesn't. If we were creating a zip from scratch we would do what I have done here, and create a zip entry with only the name. The zip code would then figure out the rest. We should be doing exactly the same thing for copying a zip, i.e. we should not pre-set what we think the compressed size, and other info are going to be. |
When cloning a zip, we were using the ZipEntry from the input zip.
This causes issues, as the info in the input ZipEntry is not necessarily correct for the output zip.
Specifically, compressed size can be different. This causes exceptions when the wrong amount of bytes are written.
This change means that a new ZipEntry is created, and the info from the input ZipEntry is ignored.