From 2572b17898e69e6592391e75a76ec6cbbc901531 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Thu, 15 Jun 2023 12:21:15 +1000 Subject: [PATCH] main: Don't install HSD if custom path specified --- FireWallet/MainForm.cs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/FireWallet/MainForm.cs b/FireWallet/MainForm.cs index 900a760..4e8af81 100644 --- a/FireWallet/MainForm.cs +++ b/FireWallet/MainForm.cs @@ -191,9 +191,14 @@ namespace FireWallet AddLog("Starting HSD"); toolStripStatusLabelstatus.Text = "Status: HSD Starting"; - if (!Directory.Exists(dir + "hsd")) + string hsdPath = dir + "hsd\\bin\\hsd.exe"; + if (nodeSettings.ContainsKey("HSD-command")) { - NotifyForm Notifyinstall = new NotifyForm("Installing hsd\nThis may take a few minutes\nDo not close FireWallet", false); + if (nodeSettings["HSD-command"].Contains("{default-dir}")) + { + if (!Directory.Exists(dir + "hsd")) + { + NotifyForm Notifyinstall = new NotifyForm("Installing hsd\nThis may take a few minutes\nDo not close FireWallet", false); Notifyinstall.Show(); // Wait for the notification to show await Task.Delay(1000); @@ -208,10 +213,14 @@ namespace FireWallet if (!Directory.Exists(dir + "hsd\\node_modules")) { AddLog("HSD install failed"); - this.Close(); - return false; + this.Close(); + return false; + } + } } + + hsdProcess = new Process(); bool hideScreen = true;