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

unzip sucessfully in 1.x but failed in latest version #65

Closed
jacktang opened this issue Sep 16, 2019 · 3 comments
Closed

unzip sucessfully in 1.x but failed in latest version #65

jacktang opened this issue Sep 16, 2019 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@jacktang
Copy link

jacktang commented Sep 16, 2019

Hello,

I created the zip using c# ICSharpCode.SharpZipLib.Zip with password. And it could be unzipped when I extracted it using zip4j version 1.3.2. I upgrade it 2.x in order to support stream. And some exception when I extract the same zip file:

Code:

    try {
      ZipFile zipFile = new ZipFile(source);
      if (zipFile.isEncrypted()) {
        zipFile.setPassword(password);
      }
      zipFile.extractAll(destination);
    } catch (ZipException e) {
      e.printStackTrace();
    }

Exception:

net.lingala.zip4j.exception.ZipException: java.io.IOException: Negative seek offset
	at net.lingala.zip4j.tasks.AsyncZipTask.performTaskWithErrorHandling(AsyncZipTask.java:49)
	at net.lingala.zip4j.tasks.AsyncZipTask.execute(AsyncZipTask.java:36)
	at net.lingala.zip4j.ZipFile.extractAll(ZipFile.java:431)
	at app.util.ZipMaker.unzip(ZipMaker.java:108)

The sample zip hello.zip with password Shu1an@2019GTS

@jacktang
Copy link
Author

@srikanth-lingala if the bug was fixed, would you please bump new version?

@srikanth-lingala
Copy link
Owner

@jacktang I will make a new release over the weekend. There is just one more feature that I want to include in the next release, and also an issue that is reported a day or two back. I want to have a look at them and make a release.

@srikanth-lingala
Copy link
Owner

Fixed in v2.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants