commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1552319 - /commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
Date Thu, 19 Dec 2013 13:39:10 GMT
Author: bodewig
Date: Thu Dec 19 13:39:09 2013
New Revision: 1552319

URL: http://svn.apache.org/r1552319
Log:
data descriptor is not supported for shrunk entries

Modified:
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java?rev=1552319&r1=1552318&r2=1552319&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
Thu Dec 19 13:39:09 2013
@@ -702,8 +702,9 @@ public class ZipArchiveInputStream exten
      * DEFLATED.
      */
     private boolean supportsDataDescriptorFor(ZipArchiveEntry entry) {
-        return allowStoredEntriesWithDataDescriptor
-                || !entry.getGeneralPurposeBit().usesDataDescriptor()
+        return !entry.getGeneralPurposeBit().usesDataDescriptor()
+
+                || (allowStoredEntriesWithDataDescriptor && entry.getMethod() ==
ZipEntry.STORED)
                 || entry.getMethod() == ZipEntry.DEFLATED;
     }
 



Mime
View raw message