Skip to content

Commit

Permalink
#410 Set entry size to 0 if entry is directory
Browse files Browse the repository at this point in the history
  • Loading branch information
srikanth-lingala committed Mar 14, 2022
1 parent 849aea9 commit 22471c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public void putNextEntry(ZipParameters zipParameters) throws IOException {
clonedZipParameters.setWriteExtendedLocalFileHeader(false);
clonedZipParameters.setCompressionMethod(CompressionMethod.STORE);
clonedZipParameters.setEncryptFiles(false);
clonedZipParameters.setEntrySize(0);
}
initializeAndWriteFileHeader(clonedZipParameters);

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/lingala/zip4j/model/ZipParameters.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public enum SymbolicLinkAction {
private String defaultFolderPath;
private String fileNameInZip;
private long lastModifiedFileTime = System.currentTimeMillis();
private long entrySize = 0;
private long entrySize = -1;
private boolean writeExtendedLocalFileHeader = true;
private boolean overrideExistingFilesInZip = true;
private String rootFolderNameInZip;
Expand Down

0 comments on commit 22471c1

Please sign in to comment.