From 9a5775698b2bd0d588fbc3e441673bf7b75cd728 Mon Sep 17 00:00:00 2001 From: Chris Rankin Date: Wed, 10 May 2017 10:31:34 +0100 Subject: [PATCH] Try to copy the CorDapp if we fail to create a symlink, e.g. on Win10. (#659) --- .../src/main/kotlin/net/corda/demobench/explorer/Explorer.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/demobench/src/main/kotlin/net/corda/demobench/explorer/Explorer.kt b/tools/demobench/src/main/kotlin/net/corda/demobench/explorer/Explorer.kt index 3312120756..8d4318e47f 100644 --- a/tools/demobench/src/main/kotlin/net/corda/demobench/explorer/Explorer.kt +++ b/tools/demobench/src/main/kotlin/net/corda/demobench/explorer/Explorer.kt @@ -92,6 +92,10 @@ class Explorer internal constructor(private val explorerController: ExplorerCont Files.copy(path, destPath) } catch(e: FileAlreadyExistsException) { // OK, don't care ... + } catch (e: IOException) { + // Windows 10 might not allow this user to create a symlink + log.warn("Failed to create symlink '{}' for '{}': {}", destPath, path, e.message) + Files.copy(path, destPath) } } }