Skip to content
This repository has been archived by the owner on Mar 26, 2023. It is now read-only.

Commit

Permalink
Fix, interpolation of path and prefix.
Browse files Browse the repository at this point in the history
  • Loading branch information
pvlasov committed Sep 9, 2019
1 parent f885762 commit 4f37c0b
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -162,15 +162,15 @@ public List<BinaryResource> execute(ProgressMonitor progressMonitor) throws Exce
}

List<BinaryResource> ret = new ArrayList<>();
String path = getPath();
String path = context.interpolate(getPath());
String prefix = context.interpolate(getPrefix());
Enumeration<String> entryPaths = bundle.getEntryPaths(path);
while (entryPaths.hasMoreElements()) {
String entryPath = entryPaths.nextElement();
String entryRelativePath = path == null || path.trim().length() == 0 ? entryPath : entryPath.substring(path.trim().length());
if (include(entryRelativePath)) {
URL entry = bundle.getEntry(entryPath);
if (entry != null) {
String prefix = getPrefix();
String targetPath = prefix == null || prefix.trim().length() == 0 ? entryRelativePath : prefix.trim()+entryRelativePath;
BinaryEntity entity = container.get(targetPath, progressMonitor.split("Getting target entity "+targetPath, 1));
if (entity == null) {
Expand Down Expand Up @@ -206,7 +206,7 @@ public List<BinaryResource> execute(ProgressMonitor progressMonitor) throws Exce
throw new IllegalStateException("Unsupported reconcile action: "+getReconcileAction());
}
} else {
entity.setState(entry.openStream(), progressMonitor.split("Setting state", 1, entity));
entity.setState(interpolate(context, entryRelativePath, entry.openStream(), progressMonitor), progressMonitor.split("Setting state", 1, entity));
}

ret.add(entity);
Expand Down

0 comments on commit 4f37c0b

Please sign in to comment.