commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject [4/6] commons-compress git commit: COMPRESS-429 also set NameSource from within stream
Date Fri, 05 Jan 2018 16:54:45 GMT
COMPRESS-429 also set NameSource from within stream


Project: http://git-wip-us.apache.org/repos/asf/commons-compress/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-compress/commit/d549178f
Tree: http://git-wip-us.apache.org/repos/asf/commons-compress/tree/d549178f
Diff: http://git-wip-us.apache.org/repos/asf/commons-compress/diff/d549178f

Branch: refs/heads/COMPRESS-429
Commit: d549178f36aaf95fd1aa2fe6a3c1403c095929b2
Parents: 9d721a0
Author: Stefan Bodewig <bodewig@apache.org>
Authored: Fri Jan 5 17:50:22 2018 +0100
Committer: Stefan Bodewig <bodewig@apache.org>
Committed: Fri Jan 5 17:50:22 2018 +0100

----------------------------------------------------------------------
 .../commons/compress/archivers/zip/ZipArchiveInputStream.java     | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-compress/blob/d549178f/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
index 54b69ae..04fc487 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java
@@ -297,6 +297,9 @@ public class ZipArchiveInputStream extends ArchiveInputStream {
         final byte[] fileName = new byte[fileNameLen];
         readFully(fileName);
         current.entry.setName(entryEncoding.decode(fileName), fileName);
+        if (hasUTF8Flag) {
+            current.entry.setNameSource(ZipArchiveEntry.NameSource.NAME_WITH_EFS_FLAG);
+        }
 
         final byte[] extraData = new byte[extraLen];
         readFully(extraData);


Mime
View raw message