fishermain / ziparchive

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

If ZipArchive had some limit of the size of the package and the number of the package when unzipping? #36

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.  I downloaded a package which named "*.zip" from server.
2.  When the package is less than 2G, the library worked well.
3.  but when the file size is bigger than 2G, the library can't open the 
package.  The function "UnzipOpenFile" return false instead. I'm not sure if 
the library has some limit of the size of the file or the number of the file.

What is the expected output? What do you see instead?

I thought it war the library's error, If there is something I can do to unzip 
my package easily. Or it‘s just my fault of my code in some place caused the 
error?

What version of the product are you using? On what operating system?
I am using version 1.2 of ZipArchive on iPad.

Please provide any additional information below.

This is my function:

-(void)unzipFile
{
    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    NSString  * docpaths= [[NSString alloc] initWithFormat:@"%@",[paths objectAtIndex:0]];
    unzipPath = [docpaths stringByAppendingPathComponent:@""];
    NSLog(@"%@",unzipPath);
    ZipArchive * unzip = [[ZipArchive alloc]init];
    if ([unzip UnzipOpenFile:downloadPath]) {
        BOOL result = [unzip UnzipFileTo:unzipPath overWrite:YES];
        if (result) {
            NSLog(@"解压成功");
            [self deleteFile];
        }else{
            NSLog(@"解压失败");
            UIAlertView * alertView = [[UIAlertView alloc]initWithTitle:@"解压失败" message:@"磁盘空间不足,请保留足够空间重新解压" delegate:self cancelButtonTitle:nil otherButtonTitles:@"确定", nil];
            alertView.alertViewStyle = UIAlertViewStylePlainTextInput;
            [alertView setTag:1];
            [alertView show];
            [alertView release];
        }
        [unzip UnzipCloseFile];
    }
    [docpaths release];
    [unzip release];    
}

    I'm sure the path is correctly, and I search the answers on stackoverflow, google, and some BBS, but I couldn't find my answer of the question. So I'm here to ask if you had the answer.
    At last, I must apologize for my poor English. If my words made you difficult to understand, I must say "I'm sorry". Thank you!

Original issue reported on code.google.com by tomymost...@gmail.com on 4 Jan 2014 at 2:53