Skip to content

Commit

Permalink
#106 Do not use CentralDirectory when extract all
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg-cherednik committed Dec 20, 2024
1 parent 8cef935 commit 80bb9ce
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/main/java/ru/olegcherednik/zip4jvm/model/block/Block.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,20 +71,20 @@ public class Block {
// }
// }

public <T> T calcSize(BaseRandomAccessDataInput dataInputLocation, LocalSupplier<T> task) throws IOException {
public <T> T calcSize(BaseRandomAccessDataInput in, LocalSupplier<T> task) throws IOException {
try {
absOffs = dataInputLocation.getAbsOffs();
// TODO get disk no from srcZip based on absOffs()
// diskOffs = dataInputLocation.getDiskOffs();
//diskNo = dataInputLocation.getDisk().getNo();
//fileName = dataInputLocation.getDisk().getFileName();
diskOffs = 777;
diskNo = 555;
fileName = "unkown.zip";
srcZip = dataInputLocation.getSrcZip();
srcZip = in.getSrcZip();
absOffs = in.getAbsOffs();

SrcZip.Disk disk = srcZip.getDiskByAbsOffs(absOffs);

diskOffs = absOffs - disk.getAbsOffs();
diskNo = disk.getNo();
fileName = disk.getFileName();

return task.get();
} finally {
calcSize(dataInputLocation);
calcSize(in);
}
}

Expand Down

0 comments on commit 80bb9ce

Please sign in to comment.