Commit bfa43f9 1 parent 5e63480 commit bfa43f9 Copy full SHA for bfa43f9
File tree 1 file changed +4
-2
lines changed
src/main/java/software/coley/lljzip/format/read
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -144,6 +144,8 @@ else if (data.getInt(jvmBaseFileOffset) == ZipPatterns.CENTRAL_DIRECTORY_FILE_HE
144
144
// Add the earliest central directory offset, which serves as the upper bound to search against for the
145
145
// last local file header entry's file data contents.
146
146
entryOffsets .add (earliestCdfh );
147
+ // Add the end of central directory
148
+ entryOffsets .add (endOfCentralDirectoryOffset );
147
149
148
150
// Create the local file entries
149
151
for (CentralDirectoryFileHeader directory : zip .getCentralDirectories ()) {
@@ -152,12 +154,12 @@ else if (data.getInt(jvmBaseFileOffset) == ZipPatterns.CENTRAL_DIRECTORY_FILE_HE
152
154
if (!offsets .contains (offset ) && data .getInt (offset ) == ZipPatterns .LOCAL_FILE_HEADER_QUAD ) {
153
155
try {
154
156
LocalFileHeader file = newLocalFileHeader ();
155
- directory .link (file );
156
- file .link (directory );
157
157
if (file instanceof JvmLocalFileHeader ) {
158
158
((JvmLocalFileHeader ) file ).setOffsets (entryOffsets );
159
159
}
160
160
file .read (data , offset );
161
+ directory .link (file );
162
+ file .link (directory );
161
163
file .adoptLinkedCentralDirectoryValues ();
162
164
zip .addPart (file );
163
165
postProcessLocalFileHeader (file );
You can’t perform that action at this time.
0 commit comments