COMPRESS-429 the reason for the name check no longer exists It used to be there to avoid unnecessary updates of ZipFile's map of entry name => entry but the handling in ZipFile has been changed to only add entries after all fields have been resolved in later revisions.
Project: http://git-wip-us.apache.org/repos/asf/commons-compress/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-compress/commit/ced2075c Tree: http://git-wip-us.apache.org/repos/asf/commons-compress/tree/ced2075c Diff: http://git-wip-us.apache.org/repos/asf/commons-compress/diff/ced2075c Branch: refs/heads/master Commit: ced2075cabcda4e5fb2db60e88cdf87bf815d24b Parents: c290609 Author: Stefan Bodewig <bode...@apache.org> Authored: Sun Jan 7 10:29:26 2018 +0100 Committer: Stefan Bodewig <bode...@apache.org> Committed: Sun Jan 7 10:29:26 2018 +0100 ---------------------------------------------------------------------- .../java/org/apache/commons/compress/archivers/zip/ZipUtil.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-compress/blob/ced2075c/src/main/java/org/apache/commons/compress/archivers/zip/ZipUtil.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ZipUtil.java b/src/main/java/org/apache/commons/compress/archivers/zip/ZipUtil.java index 783835c..34ee233 100644 --- a/src/main/java/org/apache/commons/compress/archivers/zip/ZipUtil.java +++ b/src/main/java/org/apache/commons/compress/archivers/zip/ZipUtil.java @@ -238,9 +238,7 @@ public abstract class ZipUtil { final String newName = getUnicodeStringIfOriginalMatches(name, originalNameBytes); if (newName != null) { - if (!originalName.equals(newName)) { - ze.setName(newName); - } + ze.setName(newName); ze.setNameSource(ZipArchiveEntry.NameSource.UNICODE_EXTRA_FIELD); }