Skip to content

Commit

Permalink
[KARAF-5081] Fix problem with resource extraction from kar files
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed Apr 3, 2017
1 parent 689616a commit fa3828b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kar/src/main/java/org/apache/karaf/kar/internal/Kar.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public void extract(File repoDir, File resourceDir) {

ZipEntry entry = zipIs.getNextEntry();
while (entry != null) {
if (entry.getName().startsWith("repository")) {
if (entry.getName().startsWith("repository/")) {
String path = entry.getName().substring("repository/".length());
File destFile = new File(repoDir, path);
extract(zipIs, entry, destFile);
Expand All @@ -128,8 +128,8 @@ public void extract(File repoDir, File resourceDir) {
}
}

if (entry.getName().startsWith("resource")) {
String path = entry.getName().substring("resource/".length());
if (entry.getName().startsWith("resources/")) {
String path = entry.getName().substring("resources/".length());
File destFile = new File(resourceDir, path);
extract(zipIs, entry, destFile);
}
Expand Down

0 comments on commit fa3828b

Please sign in to comment.