You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by bo...@apache.org on 2018/01/07 09:34:18 UTC
[4/9] commons-compress git commit: COMPRESS-429 also set NameSource
from within stream
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/master
Commit: d549178f36aaf95fd1aa2fe6a3c1403c095929b2
Parents: 9d721a0
Author: Stefan Bodewig <bo...@apache.org>
Authored: Fri Jan 5 17:50:22 2018 +0100
Committer: Stefan Bodewig <bo...@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);