From 7e7f7051ddcc1ffe5e760f7099055b4f56e06b85 Mon Sep 17 00:00:00 2001 From: FelisDiligens <47528453+FelisDiligens@users.noreply.github.com> Date: Sun, 23 Aug 2020 14:40:12 +0200 Subject: [PATCH] (Hotfix) Fixed an issue where new users would experience a crash because the tool didn't create a config folder. --- Fo76ini/Forms/Form1/Form1.cs | 5 ++++- Fo76ini/Interface/Translation.cs | 3 +++ Fo76ini/Shared.cs | 2 +- Fo76ini/languages/de-DE.xml | 2 +- Fo76ini/languages/en-US.xml | 2 +- VERSION | 2 +- setup.iss | 2 +- 7 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Fo76ini/Forms/Form1/Form1.cs b/Fo76ini/Forms/Form1/Form1.cs index 06a6eff..95a4285 100644 --- a/Fo76ini/Forms/Form1/Form1.cs +++ b/Fo76ini/Forms/Form1/Form1.cs @@ -194,10 +194,13 @@ private void PreventChangeOnMouseWheelForAllElements(Control control) private void Form1_Load(object sender, EventArgs e) { - // Create folder, if not present: + // Create folders, if not present: if (!Directory.Exists(Shared.AppConfigFolder)) Directory.CreateDirectory(Shared.AppConfigFolder); + if (!Directory.Exists(Localization.languageFolder)) + Directory.CreateDirectory(Localization.languageFolder); + // Create note to old config folder to inform users, if present: if (Directory.Exists(Shared.OldAppConfigFolder)) { diff --git a/Fo76ini/Interface/Translation.cs b/Fo76ini/Interface/Translation.cs index 20686a9..dc539a8 100644 --- a/Fo76ini/Interface/Translation.cs +++ b/Fo76ini/Interface/Translation.cs @@ -413,6 +413,9 @@ public void Save(String fileName, List
forms, List toolTips) } // Save it: + if (!Directory.Exists(Localization.languageFolder)) + Directory.CreateDirectory(Localization.languageFolder); + xmlDoc.Save(this.filePath); } diff --git a/Fo76ini/Shared.cs b/Fo76ini/Shared.cs index 38e35bf..84b9d6e 100644 --- a/Fo76ini/Shared.cs +++ b/Fo76ini/Shared.cs @@ -18,7 +18,7 @@ public enum GameEdition public class Shared { - public const String VERSION = "1.8.1"; + public const String VERSION = "1.8.1h1"; public static String OldAppConfigFolder = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments), "Fallout 76 Quick Configuration"); public static String AppConfigFolder = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData), "Fallout 76 Quick Configuration"); diff --git a/Fo76ini/languages/de-DE.xml b/Fo76ini/languages/de-DE.xml index 5e8c157..4c3028d 100644 --- a/Fo76ini/languages/de-DE.xml +++ b/Fo76ini/languages/de-DE.xml @@ -1,5 +1,5 @@  - + diff --git a/Fo76ini/languages/en-US.xml b/Fo76ini/languages/en-US.xml index 378b09f..e951783 100644 --- a/Fo76ini/languages/en-US.xml +++ b/Fo76ini/languages/en-US.xml @@ -4,7 +4,7 @@ Therefore any changes made to this file will be overriden. You can use this as a template for your own translation, though. --> - + diff --git a/VERSION b/VERSION index 2cf1382..b5e46a0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.8.1 +1.8.1h1 diff --git a/setup.iss b/setup.iss index c379dae..38a2f29 100644 --- a/setup.iss +++ b/setup.iss @@ -6,7 +6,7 @@ #define MyAppURL "https://www.nexusmods.com/fallout76/mods/546" #define MyAppExeName "Fo76ini.exe" -#define ProjectVersion "1.8.1" +#define ProjectVersion "1.8.1h1" #define ProjectBaseDir "C:\Users\Thomas\Documents\Fallout 76 Quick Configuration - Project files" #define ProjectGitDir "C:\Users\Thomas\Documents\Fallout 76 Quick Configuration - Project files\Fallout76-QuickConfiguration"