Hi there,
I get a errors when zipping files on OS X 10.4.11 (Tiger) but it works great on OS X 10.5.6 (Leopard) running on mono 2.2.
I just place the DLL’s in the same folder as the .exe and it works great on Leopard but not on Tiger.
I am using the Xceed Zip for .Net 3.7 component and VS Studio 2005.NET and C# 2.0.
Needless to say this code works on Windows and the latest Mac OS X.
Any ideas? Thanks.
If I use QuickZip it does create the zip file but mono and my application disappears and I get the error:
*****************************************************************************
My code (I also tried “/var/tmp/” folder with the same error):
Xceed.Zip.QuickZip.Zip(“/test.zip”, true, false, false, “/test.txt”);
Error returned:
Xceed.Zip.QuickZipException: An error occurred while adding files to the zip file. —> Xceed.Zip.InvalidZipStructureException: The zip end header signature could not be found in the zip file.
Type: Xceed.Zip.ZipArchive
FullName: /
Zip file: /test.txt.zip
at Xceed.Zip.ZipHandler.ReadEndHeader (System.IO.BinaryReader reader, Xceed.Zip.ZipStream stream) [0x00000]
at Xceed.Zip.ZipHandler.Refresh (Xceed.FileSystem.FileSystemEventsSession session) [0x00000]
at Xceed.Zip.ZipHandler.Flush (Xceed.FileSystem.FileSystemEventsSession session) [0x00000]
at Xceed.Zip.ZipHandler.Release (Xceed.FileSystem.FileSystemEventsSession session) [0x00000]
at Xceed.Zip.ZipHandler.ReleaseModify (Xceed.FileSystem.FileSystemEventsSession session) [0x00000]
at Xceed.Zip.ZipArchive.EndUpdate (Xceed.FileSystem.FileSystemEvents events, System.Object userData) [0x00000]
— End of inner exception stack trace —
at Xceed.Zip.QuickZip.Zip (System.String zipFileName, System.String encryptionPassword, EncryptionMethod encryptionMethod, CompressionMethod compressionMethod, Boolean replaceExistingFiles, Boolean recursive, Boolean preservePaths, Int64 splitSize, SplitNameFormat splitNameFormat, Xceed.Zip.Sfx.XceedSfxPrefix sfx, Xceed.Zip.DiskRequiredCallback diskRequiredCallback, Xceed.Zip.ByteProgressionCallback byteProgressionCallback, Xceed.Zip.ItemProgressionCallback itemProgressionCallback, System.Object userParams, System.String[] filesToZip) [0x00000]
at Xceed.Zip.QuickZip.Zip (System.String zipFileName, System.String encryptionPassword, EncryptionMethod encryptionMethod, Boolean replaceExistingFiles, Boolean recursive, Boolean preservePaths, Int64 splitSize, SplitNameFormat splitNameFormat, System.String[] filesToZip) [0x00000]
at Xceed.Zip.QuickZip.Zip (System.String zipFileName, System.String encryptionPassword, EncryptionMethod encryptionMethod, Boolean replaceExistingFiles, Boolean recursive, Boolean preservePaths, System.String[] filesToZip) [0x00000]
…
If I don’t use QuickZip it does create the zip file but mono and my application disappears and I get the error:
*****************************************************************************
My code (I also tried “/var/tmp/” folder with the same error):
DiskFile diskFile = new DiskFile(“/test.txt”);
diskFile.CopyTo(new ZipArchive(new DiskFile(“/test.zip”)), true);
Error returned:
Xceed.Zip.InvalidZipStructureException: The zip end header signature could not be found in the zip file.
Type: Xceed.Zip.ZipArchive
FullName: /
Zip file: /test.txt.zip
at Xceed.Zip.ZipHandler.ReadEndHeader (System.IO.BinaryReader reader, Xceed.Zip.ZipStream stream) [0x00000]
at Xceed.Zip.ZipHandler.Refresh (Xceed.FileSystem.FileSystemEventsSession session) [0x00000]
at Xceed.Zip.ZipHandler.Flush (Xceed.FileSystem.FileSystemEventsSession session) [0x00000]
at Xceed.Zip.ZipHandler.Release (Xceed.FileSystem.FileSystemEventsSession session) [0x00000]
at Xceed.Zip.ZipHandler.ReleaseModify (Xceed.FileSystem.FileSystemEventsSession session) [0x00000]
at Xceed.Zip.ZipArchive.EndUpdate (Xceed.FileSystem.FileSystemEvents events, System.Object userData) [0x00000]
If I don’t use QuickZip for the 3rd time with 4 lines of code, it does not create the zip file and mono and my application disappears and I get the error:
*****************************************************************************
My code (I also tried “/var/tmp/” folder with the same error):
AbstractFile zipFile = new DiskFile(“/test.zip”);
ZipArchive archive = new ZipArchive(zipFile);
AbstractFile textFile = new DiskFile(“/test.txt”);
textFile.CopyTo(archive, true);
Error returned:
Xceed.FileSystem.ItemDoesNotExistException: Cannot perform the requested operation on an item that does not exist.
Type: Xceed.FileSystem.DiskFile
FullName: /C:\TestTextFile.txt
at Xceed.FileSystem.AbstractFile.DoCopyTo (Xceed.FileSystem.FileSystemEventsSession session, Xceed.FileSystem.FileSystemItem destination, Boolean replaceExistingFiles) [0x00000]
at Xceed.FileSystem.FileSystemItem.ListCopyToCore (Xceed.FileSystem.FileSystemEventsSession session, Xceed.FileSystem.ItemPair currentItemPair, Boolean replaceExistingFiles) [0x00000]