From 5dd85e08bf5ae0b24d73cdefa96f16dc5003f400 Mon Sep 17 00:00:00 2001 From: Michal Kit Date: Fri, 13 Jul 2018 12:46:50 +0100 Subject: [PATCH] CORDA-1805 Fixing the NPE with path parent (#3591) --- .../net/corda/nodeapi/internal/crypto/KeyStoreUtilities.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node-api/src/main/kotlin/net/corda/nodeapi/internal/crypto/KeyStoreUtilities.kt b/node-api/src/main/kotlin/net/corda/nodeapi/internal/crypto/KeyStoreUtilities.kt index 981d16cf94..617a5df6e8 100644 --- a/node-api/src/main/kotlin/net/corda/nodeapi/internal/crypto/KeyStoreUtilities.kt +++ b/node-api/src/main/kotlin/net/corda/nodeapi/internal/crypto/KeyStoreUtilities.kt @@ -30,7 +30,7 @@ fun loadOrCreateKeyStore(keyStoreFilePath: Path, storePassword: String): KeyStor keyStoreFilePath.read { keyStore.load(it, pass) } } else { keyStore.load(null, pass) - keyStoreFilePath.parent.createDirectories() + keyStoreFilePath.toAbsolutePath().parent?.createDirectories() keyStoreFilePath.write { keyStore.store(it, pass) } } return keyStore