CORDA-1805 Fixing the NPE with path parent (#3591)

This commit is contained in:
Michal Kit 2018-07-13 12:46:50 +01:00 committed by GitHub
parent dc3bd8de7a
commit 5dd85e08bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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