[Mono-osx] Trouble zipping files on OS X 10.4.x but OK on OS X 10.5.x
d_v
dan.vandermolen at figpsoft.com
Thu Feb 26 17:55:09 EST 2009
Hi there,
I get errors when zipping files on OS X 10.4.11 but it works great on OS X
10.5.6 running on mono 2.2.
I just place the DLL's in the same folder as the .exe and it works great on
OS X Leopard but not on Tiger.
I am using the Xceed Software Zip for DotNet 3.7 component.
Any ideas?
If I use QuickZip it does create the zip file but mono and my application
dissappears 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 dissappears 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 dissappears 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]
--
View this message in context: http://www.nabble.com/Trouble-zipping-files-on-OS-X-10.4.x-but-OK-on-OS-X-10.5.x-tp22235091p22235091.html
Sent from the Mono - OSX mailing list archive at Nabble.com.
More information about the Mono-osx
mailing list