ZipArchive creates invalid ZIP file
I found the—in hindsight, obvious—error in my code. The ZipArchive has to be disposed to make it write its content to its underlying stream. So I had to save the stream to a file after the end of the using block of the ZipArchive. And it was important to set the leaveOpen argument of its … Read more