Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot unzip following zip #32

Open
fuco-mlu opened this issue Jun 10, 2014 · 6 comments
Open

Cannot unzip following zip #32

fuco-mlu opened this issue Jun 10, 2014 · 6 comments
Labels

Comments

@fuco-mlu
Copy link

On every platform I can unzip following file:

But with ZipArchive I don't get any file.

@mattconnolly
Copy link
Owner

Can you post the file that you are having trouble with?
Are there any error messages / error codes you get?

@fuco-mlu
Copy link
Author

Here you can download the file:
http://transfer.futurecom.ch/ZipArchive/1101.zip

@fuco-mlu
Copy link
Author

When the reader reach this function

                read = unzReadCurrentFile(_unzFile, buffer, 4096);

it gets -1 - "failed to read zip file".

@fuco-mlu
Copy link
Author

Seems a filesize issue. The following zip, contains two files, more then 2MB - I can unpack it. But I receive nil

http://transfer.futurecom.ch/ZipArchive/test2.zip

But the unziped content is correct.

@no-trouble
Copy link

Are you solved???

@no-trouble
Copy link

Here is my code:
`NSString *path = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES).lastObject;

NSString *zipPath = [path stringByAppendingPathComponent:@"zjejaddress.zip"];

NSString *unZipPath = [path stringByAppendingPathComponent:@"zjejaddress"];

ZipArchive *archive = [ZipArchive new];
archive.delegate = self;

BOOL open = [archive UnzipOpenFile:zipPath];
if (open) {
    
    BOOL ret = [archive UnzipFileTo:unZipPath overWrite:YES];
    if (!ret) {
        NSLog(@"解压失败");
    }
    else {
        NSLog(@"解压成功");
    }
    
    [archive UnzipCloseFile];
}`

, then 'ErrorMessage: ' print "errorMessage: Failed to read zip file"... Thanks for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants