This project is read-only.

ZipFile.Save() can not access to *.zip

Feb 15, 2011 at 4:49 PM

hi all,

I'm a beginner of programming.

Can you explain more for me about ZipFile.Save()

basically, I only use 4 statements in my program:

ZipFile zFile;


zFile.Save();  //(1)


zFile.Save(); //(2) I got exception here, like : "threre is another thread using this zip file".


does statement (1) create separate thread for saving zip, and that thread still running when I call statement (2) ?

Feb 15, 2011 at 9:10 PM

It's possible that ZipFile uses multiple threads.  If you need information on this, Please see the documentation for ZipFile.ParallelDeflateThreshold. 

But what are you really trying to do?   The code you have shown is will not run properly.   It is not complete code.    So I'm sure you have other code, that you are not showing. 

Why would you want to save a ZipFile, then remove an entry and Save() it again?   There may be a bug in the Zip library relating to this series of calls, and you can avoid it by NOT doing that. But I don't know because I cannot see the rest of your code.

If you post a full test case, I may be able to help you more.


Feb 16, 2011 at 8:50 AM

Dear Cheeso,

thank you very much for your fast reply and your very powerful DotNetZip.

It seems that I have solved my problem by myself.

I will ask you when I have more problems.

Thank you very much!

Feb 24, 2011 at 1:57 AM

I'm glad to be of service. I'm also glad you like the library.