aboutsummaryrefslogtreecommitdiffstats
path: root/ms
diff options
context:
space:
mode:
authorPiotr Darosz <piotr.darosz@nokia.com>2019-08-09 12:42:34 +0200
committerPiotr Darosz <piotr.darosz@nokia.com>2019-08-09 12:44:22 +0200
commitbf9424efd3f41893d2dfc0469fe934ce96199e6a (patch)
tree3d158fc633885415fe017a2f844be9b0560fb871 /ms
parent24f07af3434838c1d41c1dfd64bcb2a083201cd9 (diff)
Controller Blueprints fails to lookup directory
Create directory for saving CBA package in case one does not exist Issue-ID: CCSDK-1607 Signed-off-by: Piotr Darosz <piotr.darosz@nokia.com> Change-Id: I0f5b547ec781bf7211414507ee847e756402f0e7
Diffstat (limited to 'ms')
-rwxr-xr-xms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintArchiveUtils.kt3
1 files changed, 3 insertions, 0 deletions
diff --git a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintArchiveUtils.kt b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintArchiveUtils.kt
index d3670419e..8517be843 100755
--- a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintArchiveUtils.kt
+++ b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintArchiveUtils.kt
@@ -44,6 +44,9 @@ class BluePrintArchiveUtils {
*/
fun compress(source: File, destination: File, absolute: Boolean): Boolean {
try {
+ if(!destination.parentFile.exists()) {
+ destination.parentFile.mkdirs()
+ }
destination.createNewFile()
ZipArchiveOutputStream(destination).use {
recurseFiles(source, source, it, absolute)