[BUG] Fix Exception when PathDirectory empty and click "Change to relative folder" (#376), version 1.2.9.4

This commit is contained in:
Markus Hofknecht 2022-04-30 11:51:50 +02:00
parent a16e8eb7c5
commit 756838ae85
2 changed files with 9 additions and 6 deletions

View file

@ -39,5 +39,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.9.3")]
[assembly: AssemblyFileVersion("1.2.9.3")]
[assembly: AssemblyVersion("1.2.9.4")]
[assembly: AssemblyFileVersion("1.2.9.4")]

View file

@ -986,10 +986,13 @@ namespace SystemTrayMenu.UserInterface
private void ButtonChangeRelativeFolder_Click(object sender, EventArgs e)
{
Settings.Default.PathDirectory = Path.GetRelativePath(
Directory.GetParent(Assembly.GetEntryAssembly().Location).FullName,
Config.Path);
textBoxFolder.Text = Config.Path;
if (!string.IsNullOrEmpty(Config.Path))
{
Settings.Default.PathDirectory = Path.GetRelativePath(
Directory.GetParent(Assembly.GetEntryAssembly().Location).FullName,
Config.Path);
textBoxFolder.Text = Config.Path;
}
}
private void ButtonOpenAssemblyLocation_Click(object sender, EventArgs e)