This is an automated email from the ASF dual-hosted git repository.
pauls pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-whiteboard.git
The following commit(s) were added to refs/heads/master by this push:
new 44e4a49 SLING-9670: add a new unpack extension for the feature model.
44e4a49 is described below
commit 44e4a4906638cbe5352e65a2ecfa522e12694362
Author: Karl Pauls <[email protected]>
AuthorDate: Tue Aug 18 17:07:12 2020 +0200
SLING-9670: add a new unpack extension for the feature model.
---
.../src/main/java/org/apache/sling/feature/extension/unpack/Unpack.java | 2 +-
.../test/java/org/apache/sling/feature/extension/unpack/TestUnpack.java | 2 --
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git
a/featuremodel-unpack-extension/src/main/java/org/apache/sling/feature/extension/unpack/Unpack.java
b/featuremodel-unpack-extension/src/main/java/org/apache/sling/feature/extension/unpack/Unpack.java
index af8062c..9dfdaf0 100644
---
a/featuremodel-unpack-extension/src/main/java/org/apache/sling/feature/extension/unpack/Unpack.java
+++
b/featuremodel-unpack-extension/src/main/java/org/apache/sling/feature/extension/unpack/Unpack.java
@@ -205,7 +205,7 @@ public class Unpack
List<String> roots = parseRoots(indexValue);
for (ZipEntry entry = jarInputStream.getNextEntry(); entry !=
null; entry = jarInputStream.getNextEntry())
{
- if (!entry.isDirectory() && isRoot(roots, entry.getName()))
+ if (!entry.isDirectory() &&
!entry.getName().toLowerCase().startsWith("meta-inf/") && isRoot(roots,
entry.getName()))
{
File target = new File(base, relativize(roots,
entry.getName()));
if
(target.getParentFile().toPath().startsWith(base.toPath()))
diff --git
a/featuremodel-unpack-extension/src/test/java/org/apache/sling/feature/extension/unpack/TestUnpack.java
b/featuremodel-unpack-extension/src/test/java/org/apache/sling/feature/extension/unpack/TestUnpack.java
index 933168c..484e2da 100644
---
a/featuremodel-unpack-extension/src/test/java/org/apache/sling/feature/extension/unpack/TestUnpack.java
+++
b/featuremodel-unpack-extension/src/test/java/org/apache/sling/feature/extension/unpack/TestUnpack.java
@@ -30,12 +30,10 @@ import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
-import java.util.jar.JarFile;
import java.util.jar.JarOutputStream;
import java.util.jar.Manifest;
import java.util.zip.ZipEntry;
-import org.apache.sling.feature.io.IOUtils;
import org.junit.Assert;
import org.junit.Test;