From d69d9c6fdea1665fe12a1d1e6c4f0951e5bdc606 Mon Sep 17 00:00:00 2001 From: Chris Rankin Date: Tue, 21 Feb 2017 11:10:27 +0000 Subject: [PATCH] CORPRIV-661: Ensure that we can rewrite saved profiles correctly. --- .../kotlin/net/corda/demobench/profile/ProfileController.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/demobench/src/main/kotlin/net/corda/demobench/profile/ProfileController.kt b/tools/demobench/src/main/kotlin/net/corda/demobench/profile/ProfileController.kt index 014eed9897..3582ca700c 100644 --- a/tools/demobench/src/main/kotlin/net/corda/demobench/profile/ProfileController.kt +++ b/tools/demobench/src/main/kotlin/net/corda/demobench/profile/ProfileController.kt @@ -39,6 +39,10 @@ class ProfileController : Controller() { val configs = nodeController.activeNodes + // Delete the profile, if it already exists. The save + // dialogue has already confirmed that this is OK. + target.delete() + FileSystems.newFileSystem(URI.create("jar:" + target.toURI()), mapOf("create" to "true")).use { fs -> configs.forEach { it -> val nodeDir = Files.createDirectories(fs.getPath(it.key))