Allow Node Explorer to be relaunched.

This commit is contained in:
Chris Rankin 2017-02-10 09:27:38 +00:00
parent e966812105
commit d6514f7524

View File

@ -12,7 +12,7 @@ class Explorer(val explorerController: ExplorerController) : AutoCloseable {
fun open(config: NodeConfig, onExit: (NodeConfig) -> Unit) {
val explorerDir = config.explorerDir.toFile()
if (!explorerDir.mkdirs()) {
if (!explorerDir.isDirectory() && !explorerDir.mkdirs()) {
log.warn("Failed to create working directory '{}'", explorerDir.getAbsolutePath())
onExit(config)
return