From 5e89003fa9a6f892c2922658a5c1d3f900b557d9 Mon Sep 17 00:00:00 2001 From: Lianhao Lu Date: Thu, 21 Nov 2019 10:29:08 +0800 Subject: Tolerate subdirectory zip entries in csar Issue-ID: VNFSDK-516 Signed-off-by: Lianhao Lu Change-Id: Ic14e713522871fba5ebce92870ff796624f4a820 --- csarvalidation/src/main/java/org/onap/cvc/csar/FileArchive.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'csarvalidation/src/main/java/org/onap/cvc/csar/FileArchive.java') 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); } } -- cgit 1.2.3-korg