Skip to content

ZipException: File header and local file header mismatch #363

@aditya-agg

Description

@aditya-agg

Hi, I have created zip using zip4j and it is failing with the mentioned exception during unzipping.
Zip file is created using following code

File outputFile = new File(zipFile);
outputFile.getParentFile().mkdirs();
ZipFile outputZippedFile = new ZipFile(zipFile);
ZipParameters zipParameters = new ZipParameters();
zipParameters.setSymbolicLinkAction(ZipParameters.SymbolicLinkAction.INCLUDE_LINK_ONLY);
outputZippedFile.addFolder(new File(sourceFolder), zipParameters);

I have been able to unzip it using other tools, but getting exception with Zip4j. Attaching zip file for reference
zipFile.zip

Metadata

Metadata

Labels

bugSomething isn't workingresolved

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions