Unable to set directoryPathInArchive with AddFiles() Method (v.

May 4, 2009 at 2:01 PM
This is my code:

ZipFile Zip = new ZipFile();
string[] FileList = Directory.GetFiles(DirectoryToBackup, "*.*", SearchOption.AllDirectories);
Zip.AddFiles(FileList, true, "Prova");

It makes a Zip file but in the zip file there is the complete tree path of the original folder. In my case "Users\Administrator\AppData\Roaming\Mozilla\".
It seems that the string directoryPathInArchve value passed ("Prova" in the example) to the method is not working when I set to true the recursiveDirHierarchy.
If I set to false, I lose the tree of original folder, so It is useless.

I think it is a bug. (There was at AddSelectedFile() Method too (see here: http://dotnetzip.codeplex.com/Thread/View.aspx?ThreadId=49468, fixed after bug report)

May 4, 2009 at 4:52 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
May 8, 2009 at 5:12 PM

This is now fixed in v1.8.3.3.

May 8, 2009 at 9:08 PM

Yes, I confirm, the bug has been fixed. Thank you!

May 8, 2009 at 10:05 PM

Great, glad to hear it. 
Bene, bene, Molto bene.