From 1d0f8bcb81b55aaf09e5868a3308e2340bf888b4 Mon Sep 17 00:00:00 2001 From: Paul Hebble Date: Sun, 28 Mar 2021 03:18:13 +0000 Subject: [PATCH] Tell user if instance addition fails --- Core/Net/Repo.cs | 2 +- GUI/Dialogs/ManageGameInstancesDialog.cs | 5 ++++- Netkan/Validators/VrefValidator.cs | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Core/Net/Repo.cs b/Core/Net/Repo.cs index 7ff6a67760..a5e8ddef22 100644 --- a/Core/Net/Repo.cs +++ b/Core/Net/Repo.cs @@ -381,7 +381,7 @@ private static List UpdateRegistryFromTarGz(string path, out SortedD using (GZipInputStream gzipStream = new GZipInputStream(inputStream)) { // Create a handle for the tar stream. - using (TarInputStream tarStream = new TarInputStream(gzipStream)) + using (TarInputStream tarStream = new TarInputStream(gzipStream, Encoding.UTF8)) { TarEntry entry; while ((entry = tarStream.GetNextEntry()) != null) diff --git a/GUI/Dialogs/ManageGameInstancesDialog.cs b/GUI/Dialogs/ManageGameInstancesDialog.cs index 4a04afafb0..d3fa9874ce 100644 --- a/GUI/Dialogs/ManageGameInstancesDialog.cs +++ b/GUI/Dialogs/ManageGameInstancesDialog.cs @@ -108,7 +108,10 @@ private void AddToCKANMenuItem_Click(object sender, EventArgs e) { _user.RaiseError(Properties.Resources.ManageGameInstancesNotValid, new object[] { k.path }); - return; + } + catch (Exception exc) + { + _user.RaiseError(exc.Message); } } diff --git a/Netkan/Validators/VrefValidator.cs b/Netkan/Validators/VrefValidator.cs index 93b6ca13e5..6fd44b592c 100644 --- a/Netkan/Validators/VrefValidator.cs +++ b/Netkan/Validators/VrefValidator.cs @@ -59,7 +59,7 @@ public void Validate(Metadata metadata) // This means the install stanzas don't match any files. // That's not our problem; someone else will report it. } - catch (Kraken k) + catch (Kraken) { // If FindInternalAvc throws anything else, then there's a version file with a syntax error. // This shouldn't cause the inflation to fail, but it does deprive us of the path.