aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimamSidero <imam.hussain@est.tech>2022-08-30 19:10:31 +0100
committerVasyl Razinkov <vasyl.razinkov@est.tech>2022-08-31 20:22:00 +0000
commit7e84536e49b49cd1721b324d1ccaa17ca96456a7 (patch)
tree2a21fd3249fd018f5410fb58da1c9be7a70a87f6
parent3d22bd913a7ecb619243d2304d75de298e044a9c (diff)
Service-import sub import path fixed
sub imported files path are fixed in importing a service Issue-ID: SDC-4150 Signed-off-by: Imam hussain <imam.hussain@est.tech> Change-Id: Ibec3fd25f8316b678cfa76fe6c688d89701787d8
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/csar/ServiceCsarInfo.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/csar/ServiceCsarInfo.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/csar/ServiceCsarInfo.java
index 8dfe106713..5c948323a4 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/csar/ServiceCsarInfo.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/csar/ServiceCsarInfo.java
@@ -103,7 +103,8 @@ public class ServiceCsarInfo extends CsarInfo {
if (CollectionUtils.isNotEmpty(importsList)) {
if (importsList.get(0) instanceof String) {
List<Path> importPaths = new ArrayList<>();
- importsList.stream().forEach(importPath -> importPaths.add(Paths.get((String) importPath)));
+ importsList.stream()
+ .forEach(importPath -> importPaths.add(fileParentDir == null ? Paths.get((String) importPath) : fileParentDir.resolve(Paths.get((String) importPath)).normalize()));
return importPaths;
} else if (importsList.get(0) instanceof Map) {
return getTemplateImportFilePathsMultiLineGrammar(importsList, fileParentDir);