summaryrefslogtreecommitdiffstats
path: root/csarvalidation/src/main/java/org/onap
diff options
context:
space:
mode:
authorLianhao Lu <lianhao.lu@intel.com>2019-11-21 10:29:08 +0800
committerLianhao Lu <lianhao.lu@intel.com>2019-11-22 17:08:34 +0800
commit5e89003fa9a6f892c2922658a5c1d3f900b557d9 (patch)
tree22095a741412c50ff439458acf02d19f3c32072b /csarvalidation/src/main/java/org/onap
parentd20bea49fb797bc5a530d7ac854e5e8d3034785f (diff)
Tolerate subdirectory zip entries in csar
Issue-ID: VNFSDK-516 Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Change-Id: Ic14e713522871fba5ebce92870ff796624f4a820
Diffstat (limited to 'csarvalidation/src/main/java/org/onap')
-rw-r--r--csarvalidation/src/main/java/org/onap/cvc/csar/FileArchive.java5
-rw-r--r--csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR130206.java2
2 files changed, 6 insertions, 1 deletions
diff --git a/csarvalidation/src/main/java/org/onap/cvc/csar/FileArchive.java b/csarvalidation/src/main/java/org/onap/cvc/csar/FileArchive.java
index 86904b1..e2aa06b 100644
--- a/csarvalidation/src/main/java/org/onap/cvc/csar/FileArchive.java
+++ b/csarvalidation/src/main/java/org/onap/cvc/csar/FileArchive.java
@@ -122,6 +122,11 @@ public class FileArchive {
if(entry.isDirectory()){
filePath.mkdirs();
} else {
+ //create directories for sub directories in zip
+ File parentPathFile = filePath.getParentFile();
+ if (parentPathFile != null) {
+ parentPathFile.mkdirs();
+ }
extract(zipInputStream, filePath);
}
}
diff --git a/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR130206.java b/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR130206.java
index e36314a..16b6942 100644
--- a/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR130206.java
+++ b/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR130206.java
@@ -124,7 +124,7 @@ public class VTPValidateCSARR130206 extends VTPValidateCSARBase {
}
} catch (Exception e) {
LOG.error("Internal VTPValidateCSARR130206 command error", e);
- throw new OnapCommandException("0x3000", "Internal VTPValidateCSARR787966 command error. See logs.");
+ throw new OnapCommandException("0x3000", "Internal VTPValidateCSARR130206 command error. See logs.");
}
}