FlattenFoldersOnExtract not is operative

Sep 25, 2009 at 7:12 PM

i have a problem with library, i use the function FlattenFoldersOnExtract but this no is operative, i want compress a file, this exist in
the zip create the structure on similar a this
Oscar4.Zip\Inetpub\wwwroot\SisMaster\Archivos - archivo ZIP, tamaño descomprimido 36 bytes
this an error, because show my configuration folder in asp .net, this a warning of security.
I test with
FlattenFoldersOnExtract = False or FlattenFoldersOnExtract = true

Sep 26, 2009 at 2:14 AM

You are misunderstanding the purpose of the FlattenFoldersOnExtract property.

The FlattenFoldersOnExtract works only when you extract the archive.  Not when you create the archive.

If you want to remove the path when you create the archive, then you need to use the AddFile() or AddDirectory() method that accepts a directoryPathInArchive parameter. Specify "" (an empty, non-Nothing string).