commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r769291 - /commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
Date Tue, 28 Apr 2009 08:31:15 GMT
Author: bodewig
Date: Tue Apr 28 08:31:15 2009
New Revision: 769291

URL: http://svn.apache.org/viewvc?rev=769291&view=rev
Log:
Only use the zip-extra-field if configured to do so and the entry didn't set the EFS flag
- COMPRESS-70

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=769291&r1=769290&r2=769291&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
Tue Apr 28 08:31:15 2009
@@ -54,7 +54,7 @@
     /**
      * Whether to look for and use Unicode extra fields.
      */
-    private final boolean useUnicodeExtraFields; // TODO not yet used
+    private final boolean useUnicodeExtraFields;
 
     private final InputStream in;
 
@@ -178,8 +178,9 @@
         readFully(extraData);
         current.setExtra(extraData);
 
-        ZipUtil.setNameAndCommentFromExtraFields(current, fileName, null);
-
+        if (!hasEFS && useUnicodeExtraFields) {
+            ZipUtil.setNameAndCommentFromExtraFields(current, fileName, null);
+        }
         return current;
     }
 



Mime
View raw message