item has been already added

Dec 28, 2010 at 11:19 AM

Hello, I have this problem with dotnetzip lib. I add some folders to my zip file thru  


Now, if a folder contains a file with the same name of a file in another folder, it issues an exception "an item with the same key has already been added".

Of course it's normal ( think at readme.txt, or any other document a user can have with the same name, but in different folders...) but can't understand why this cases are refused by dotnetzip.

What can I do to have my zip file ? shoud I use another way to add files ? I cannot avoid to have 2 file with same name (of course in different folders).

Thanks ! Saverio


Dec 28, 2010 at 11:45 AM

..too obvious ! I left blank the second arguments of the method, while it has to contain System.IO.Path.GetFileName(Folder) !

happy new year guys


Jan 6, 2011 at 6:35 PM

yes, that sounds right.  I'm glad you figured it.

happy new year to you, too.