Hello.
I've downloaded the ZipArchive library and I've added to my project. I use the method CreateZipFile2: , I add the file to the zip with addFileToZip:newname: and I close the zip calling back the method CloseZipFile2.
Then the zip is done in the finder, but in its inside I've an image that I can't open because it's empity (it's 0kb).
Someone knows why?
In attachment I put the portion of code that I use to do the zip.
NSString* zipName = @"archivio.zip";
NSMutableArray* array = [[NSMutableArray alloc]init];
[array addObject:@"photo1.jpg"];
ZipArchive* zip = [[ZipArchive alloc] init];
[zip CreateZipFile2:zipName];
[zip addFileToZip:[array objectAtIndex:0] newname:[array objectAtIndex:0]];
[zip CloseZipFile2];
[zip release];
Comment #1
Posted on Feb 15, 2011 by Happy WombatProbably doesn't find the file--you should get better results by passing ZipArchive the complete path to a file, and not just the filename.
I just joined this project, so I realize the reply is a little late, but let me know if you still have troubles.
Status: WontFix
Labels:
Type-Defect
Priority-Medium