CORPRIV-661: Ensure that we can rewrite saved profiles correctly.

This commit is contained in:
Chris Rankin 2017-02-21 11:10:27 +00:00
parent 8624537d34
commit d69d9c6fde

View File

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