0 votes
by (120 points)
edited

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.

Applies to: Rebex ZIP

1 Answer

0 votes
by (73.5k points)
edited

Can you please send me the password protected ZIP file to support@rebex.net (I don't need to know password, I just want to see the archive structure)? Or if it is not possible, can you please post here the code to create such file using ICSharpZipLib?

Probable cause is that the ZIP archive contains directory named Geneva, but we are taking it as an empty file. The file analysis should show us more. Thank you.

...