Skip to content

Commit

Permalink
(Hotfix) Fixed an issue where new users would experience a crash beca…
Browse files Browse the repository at this point in the history
…use the tool didn't create a config folder.
  • Loading branch information
FelisDiligens committed Aug 23, 2020
1 parent 72cea11 commit 7e7f705
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 6 deletions.
5 changes: 4 additions & 1 deletion Fo76ini/Forms/Form1/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down
3 changes: 3 additions & 0 deletions Fo76ini/Interface/Translation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,9 @@ public void Save(String fileName, List<Form> forms, List<ToolTip> toolTips)
}

// Save it:
if (!Directory.Exists(Localization.languageFolder))
Directory.CreateDirectory(Localization.languageFolder);

xmlDoc.Save(this.filePath);
}

Expand Down
2 changes: 1 addition & 1 deletion Fo76ini/Shared.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion Fo76ini/languages/de-DE.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Language name="Deutsch (Deutschland)" iso="de-DE" author="datasnake" version="1.8.1">
<Language name="Deutsch (Deutschland)" iso="de-DE" author="datasnake" version="1.8.1h1">
<Strings>
<String text="Eine neue Version ist verfügbar: {0}" id="newVersionAvailable" />
<String text="Jetzt aktualisieren!" id="updateNowButton" />
Expand Down
2 changes: 1 addition & 1 deletion Fo76ini/languages/en-US.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
-->
<Language name="English (USA)" iso="en-US" version="1.8.1">
<Language name="English (USA)" iso="en-US" version="1.8.1h1">
<Strings>
<String text="There is a newer version available: {0}" id="newVersionAvailable" />
<String text="Update now!" id="updateNowButton" />
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.8.1
1.8.1h1
2 changes: 1 addition & 1 deletion setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 7e7f705

Please sign in to comment.