mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-04 21:36:45 +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) {
|
private synchronized File getHwiExecutable(Command command) {
|
||||||
File hwiExecutable = Config.get().getHwi();
|
File hwiExecutable = Config.get().getHwi();
|
||||||
if(hwiExecutable != null && hwiExecutable.exists()) {
|
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) {
|
if(Platform.getCurrent() == Platform.OSX) {
|
||||||
deleteDirectory(hwiExecutable.getParentFile());
|
deleteDirectory(hwiExecutable.getParentFile());
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue