iSibDev / ziparchive

Automatically exported from code.google.com/p/ziparchive
0 stars 0 forks source link

Problem with image #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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];

Original issue reported on code.google.com by alessio....@gmail.com on 8 Nov 2010 at 5:04

GoogleCodeExporter commented 9 years ago
Probably 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.

Original comment by elinc...@hachisoft.com on 15 Feb 2011 at 8:01