mirror of
https://github.com/corda/corda.git
synced 2025-06-03 16:10:58 +00:00
Allow DemoBench to install Explorer's CorDapps multiple times. (#761)
This commit is contained in:
parent
0e1e4042dc
commit
e117ab7703
@ -11,6 +11,7 @@ import net.corda.demobench.readErrorLines
|
|||||||
import tornadofx.*
|
import tornadofx.*
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import java.nio.file.Files
|
import java.nio.file.Files
|
||||||
|
import java.nio.file.StandardCopyOption.*
|
||||||
import java.util.concurrent.Executors
|
import java.util.concurrent.Executors
|
||||||
|
|
||||||
class Explorer internal constructor(private val explorerController: ExplorerController) : AutoCloseable {
|
class Explorer internal constructor(private val explorerController: ExplorerController) : AutoCloseable {
|
||||||
@ -89,13 +90,13 @@ class Explorer internal constructor(private val explorerController: ExplorerCont
|
|||||||
Files.createSymbolicLink(destPath, path)
|
Files.createSymbolicLink(destPath, path)
|
||||||
} catch(e: UnsupportedOperationException) {
|
} catch(e: UnsupportedOperationException) {
|
||||||
// OS doesn't support symbolic links?
|
// OS doesn't support symbolic links?
|
||||||
Files.copy(path, destPath)
|
Files.copy(path, destPath, REPLACE_EXISTING)
|
||||||
} catch(e: FileAlreadyExistsException) {
|
} catch (e: java.nio.file.FileAlreadyExistsException) {
|
||||||
// OK, don't care ...
|
// OK, don't care ...
|
||||||
} catch (e: IOException) {
|
} catch (e: IOException) {
|
||||||
// Windows 10 might not allow this user to create a symlink
|
// Windows 10 might not allow this user to create a symlink
|
||||||
log.warn("Failed to create symlink '{}' for '{}': {}", destPath, path, e.message)
|
log.warn("Failed to create symlink '{}' for '{}': {}", destPath, path, e.message)
|
||||||
Files.copy(path, destPath)
|
Files.copy(path, destPath, REPLACE_EXISTING)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user