Browse Source

merge zip64 fix from commons compress

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1486439 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 12 years ago
parent
commit
3fb0180530
2 changed files with 5 additions and 2 deletions
  1. +3
    -0
      WHATSNEW
  2. +2
    -2
      src/main/org/apache/tools/zip/Zip64ExtendedInformationExtraField.java

+ 3
- 0
WHATSNEW View File

@@ -8,6 +8,9 @@ Changes that could break older environments:
Fixed bugs: Fixed bugs:
----------- -----------


* Parsing of zip64 extra fields has become more lenient in order to
be able to read archives created by DotNetZip and maybe other
archivers as well.


Other changes: Other changes:
-------------- --------------


+ 2
- 2
src/main/org/apache/tools/zip/Zip64ExtendedInformationExtraField.java View File

@@ -240,7 +240,7 @@ public class Zip64ExtendedInformationExtraField
* field with knowledge which fields are expected to be there. * field with knowledge which fields are expected to be there.
* *
* <p>All four fields inside the zip64 extended information extra * <p>All four fields inside the zip64 extended information extra
* field are optional and only present if their corresponding
* field are optional and must only be present if their corresponding
* entry inside the central directory contains the correct magic * entry inside the central directory contains the correct magic
* value.</p> * value.</p>
*/ */
@@ -254,7 +254,7 @@ public class Zip64ExtendedInformationExtraField
+ (hasCompressedSize ? DWORD : 0) + (hasCompressedSize ? DWORD : 0)
+ (hasRelativeHeaderOffset ? DWORD : 0) + (hasRelativeHeaderOffset ? DWORD : 0)
+ (hasDiskStart ? WORD : 0); + (hasDiskStart ? WORD : 0);
if (rawCentralDirectoryData.length != expectedLength) {
if (rawCentralDirectoryData.length < expectedLength) {
throw new ZipException("central directory zip64 extended" throw new ZipException("central directory zip64 extended"
+ " information extra field's length" + " information extra field's length"
+ " doesn't match central directory" + " doesn't match central directory"


Loading…
Cancel
Save