From 2716c9dbc16b8bfb01822747d2f68e68892756f3 Mon Sep 17 00:00:00 2001
From: Sparronator9999 <86388887+Sparronator9999@users.noreply.github.com>
Date: Sun, 5 Jan 2025 20:27:48 +1100
Subject: [PATCH] 1.0 Beta 4 (hotfix 1): Fix crash on service uninstall
---
YAMDCC.Common/YAMDCC.Common.csproj | 2 +-
YAMDCC.Config/YAMDCC.Config.csproj | 2 +-
YAMDCC.ConfigEditor/MainWindow.cs | 8 +++++++-
YAMDCC.ConfigEditor/YAMDCC.ConfigEditor.csproj | 2 +-
YAMDCC.ECAccess/YAMDCC.ECAccess.csproj | 2 +-
YAMDCC.ECInspector/YAMDCC.ECInspector.csproj | 2 +-
YAMDCC.Logs/YAMDCC.Logs.csproj | 2 +-
YAMDCC.Service/YAMDCC.Service.csproj | 2 +-
8 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/YAMDCC.Common/YAMDCC.Common.csproj b/YAMDCC.Common/YAMDCC.Common.csproj
index c235368..de4da13 100644
--- a/YAMDCC.Common/YAMDCC.Common.csproj
+++ b/YAMDCC.Common/YAMDCC.Common.csproj
@@ -13,7 +13,7 @@
net48
YAMDCC common code library
1.0.0
- beta.4
+ beta.4-hotfix.1
none
diff --git a/YAMDCC.Config/YAMDCC.Config.csproj b/YAMDCC.Config/YAMDCC.Config.csproj
index dba0165..68ef07f 100644
--- a/YAMDCC.Config/YAMDCC.Config.csproj
+++ b/YAMDCC.Config/YAMDCC.Config.csproj
@@ -13,7 +13,7 @@
net48
YAMDCC config library
1.0.0
- beta.4
+ beta.4-hotfix.1
none
diff --git a/YAMDCC.ConfigEditor/MainWindow.cs b/YAMDCC.ConfigEditor/MainWindow.cs
index 71a1db1..f9112f4 100644
--- a/YAMDCC.ConfigEditor/MainWindow.cs
+++ b/YAMDCC.ConfigEditor/MainWindow.cs
@@ -197,7 +197,13 @@ private void MainWindow_Closing(object sender, FormClosingEventArgs e)
SendServiceMessage(new ServiceCommand(Command.FullBlast, "0"));
}
GlobalConfig.App = "YAMDCC";
- GlobalConfig.Save();
+ try
+ {
+ GlobalConfig.Save();
+ }
+ // ignore DirectoryNotFoundException, since we probably closed the
+ // window due to uninstalling with data directory delete enabled
+ catch (DirectoryNotFoundException) { }
}
private void OnProcessExit(object sender, EventArgs e)
diff --git a/YAMDCC.ConfigEditor/YAMDCC.ConfigEditor.csproj b/YAMDCC.ConfigEditor/YAMDCC.ConfigEditor.csproj
index 2e85529..ed70a1b 100644
--- a/YAMDCC.ConfigEditor/YAMDCC.ConfigEditor.csproj
+++ b/YAMDCC.ConfigEditor/YAMDCC.ConfigEditor.csproj
@@ -21,7 +21,7 @@
YAMDCC configuration utility
true
1.0.0
- beta.4
+ beta.4-hotfix.1
none
diff --git a/YAMDCC.ECAccess/YAMDCC.ECAccess.csproj b/YAMDCC.ECAccess/YAMDCC.ECAccess.csproj
index bc109e5..ab5ae58 100644
--- a/YAMDCC.ECAccess/YAMDCC.ECAccess.csproj
+++ b/YAMDCC.ECAccess/YAMDCC.ECAccess.csproj
@@ -14,7 +14,7 @@
net48
YAMDCC EC access library
1.0.0
- beta.4
+ beta.4-hotfix.1
none
diff --git a/YAMDCC.ECInspector/YAMDCC.ECInspector.csproj b/YAMDCC.ECInspector/YAMDCC.ECInspector.csproj
index 39df5a4..944e508 100644
--- a/YAMDCC.ECInspector/YAMDCC.ECInspector.csproj
+++ b/YAMDCC.ECInspector/YAMDCC.ECInspector.csproj
@@ -19,7 +19,7 @@
YAMDCC EC inspector
true
1.0.0
- beta.4
+ beta.4-hotfix.1
none
diff --git a/YAMDCC.Logs/YAMDCC.Logs.csproj b/YAMDCC.Logs/YAMDCC.Logs.csproj
index 8984acb..39b728a 100644
--- a/YAMDCC.Logs/YAMDCC.Logs.csproj
+++ b/YAMDCC.Logs/YAMDCC.Logs.csproj
@@ -13,7 +13,7 @@
net48
YAMDCC logging library
1.0.0
- beta.4
+ beta.4-hotfix.1
none
diff --git a/YAMDCC.Service/YAMDCC.Service.csproj b/YAMDCC.Service/YAMDCC.Service.csproj
index 589ad03..5d5f47f 100644
--- a/YAMDCC.Service/YAMDCC.Service.csproj
+++ b/YAMDCC.Service/YAMDCC.Service.csproj
@@ -15,7 +15,7 @@
net48
YAMDCC helper service
1.0.0
- beta.4
+ beta.4-hotfix.1
app.manifest