mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-04 13:26:44 +00:00
allow manual configuration of hwi executable path
This commit is contained in:
parent
3fe5fd89c4
commit
a8430c79eb
1 changed files with 3 additions and 1 deletions
|
@ -222,7 +222,9 @@ public class Hwi {
|
|||
private synchronized File getHwiExecutable(Command command) {
|
||||
File hwiExecutable = Config.get().getHwi();
|
||||
if(hwiExecutable != null && hwiExecutable.exists()) {
|
||||
if(command.isTestFirst() && (!hwiExecutable.getAbsolutePath().contains(VERSION_PREFIX) || !testHwi(hwiExecutable))) {
|
||||
String tmpDir = System.getProperty("java.io.tmpdir");
|
||||
String hwiPath = hwiExecutable.getAbsolutePath();
|
||||
if(command.isTestFirst() && hwiPath.startsWith(tmpDir) && (!hwiPath.contains(VERSION_PREFIX) || !testHwi(hwiExecutable))) {
|
||||
if(Platform.getCurrent() == Platform.OSX) {
|
||||
deleteDirectory(hwiExecutable.getParentFile());
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue