This project is read-only.

using ZipFile, Update() after Save()

Sep 29, 2010 at 5:03 PM

Here is the idea of what I need to do:

            using(ZipFile zip = new ZipFile())
                zip.AddEntry("file1.txt", "line1");
                zip.UpdateEntry("file1.txt", "line2");

What I would expect is having a "c:\temp\"   with  "file1.txt"  with content  "line2". What I actually get is a zip file with  "file1.txt"  corrupted.

I need to keep all the information compressed in memory, and from time to time save it to disk. Something that works but that I dont like  is  after saving  the zip to create a new zip file by reading the just saved file, then update and then save again. 

Any help will be greatly appreciated.





Sep 30, 2010 at 2:13 PM
Edited Sep 30, 2010 at 2:15 PM
What you want to do should work. I'll have to take a closer look to see the source of the problem. In the meantime, you have your workaround.