I have quite simple password protected zip archive with two folders and one file, created with ICSharpZipLib, it is extracted succefully by any tool i tried except for Rebex ZIP. with simple code like
using (var archive = new ZipArchive(@"geneva.zip"))
{
archive.Password = "xxx";
archive.ExtractAll(@"d:\temppackage", ArchiveActionOnExistingFile.OverwriteAll);
}
it fails with following exception:
Rebex.IO.Compression.ZipException: Cannot create a directory because a file with the same name already exists ('d:\temppackage\Geneva') (CannotCreateDirectory). ---> Rebex.IO.Compression.ZipException: File already exists ('d:\temppackage\Geneva') (FileExists).
--- End of inner exception stack trace ---
at wWGvS.crxgKKZ.HandleException(Exception ex, CKXMwa type, CLTgiA remoteInfo, CLTgiA localInfo, cLEjCHZ defaultAction, cLEjCHZ possibleActions, cLEjCHZ& chosenAction)
at wWGvS.crxgKKZ.HandleCaughtException(Exception caught, String message, CKXMwa type, String remotePath, String localPath, CLTgiA remoteInfo, CLTgiA localInfo, cLEjCHZ possibleActions, cLEjCHZ& chosenAction)
at wWGvS.crxgKKZ.caWhwrZ(AszRps )
at wWGvS.crxgKKZ.BlJVnoZ()
at wWGvS.crxgKKZ.TransferFiles(Boolean putFile, Object expectedRootItem, CcBEDL pathList, String targetPath, BJXzjV transferOptions, COqSqG existingFileMode)
at BdMYQc.cXXDQgZ.AIPEbVZ(FileSet , String , ArchiveLinkMode , ArchiveActionOnExistingFile )
at Rebex.IO.Compression.ZipArchive.BZULYqZ(FileSet , String , ArchiveActionOnExistingFile )
at Rebex.IO.Compression.ZipArchive.Extract(FileSet pathCollection, String targetDirectoryPath, ArchiveActionOnExistingFile defaultActionOnExistingFiles)
at Rebex.IO.Compression.ZipArchive.Extract(String archivePathOrMask, String targetDirectoryPath, ArchiveTraversalMode mode, ArchiveActionOnExistingFile defaultActionOnExistingFiles)
at Rebex.IO.Compression.ZipArchive.ExtractAll(String targetDirectoryPath, ArchiveActionOnExistingFile defaultActionOnExistingFiles)
at ConsoleApplication62.Program.Main(String[] args) in D:\t2\ConsoleApplication62\ConsoleApplication62\Program.cs:line 39
Target folder is empty before extraction. It seems rebex creates file with actual directory name. And then tries to create directory and fails.