Skip to content

Commit

Permalink
Linux: Fixed startup crash when executed from path that no longer exists
Browse files Browse the repository at this point in the history
  • Loading branch information
SourMesen committed Nov 21, 2023
1 parent 3cbe2be commit e75f33a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion UI/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ class Program

static Program()
{
Program.OriginalFolder = Environment.CurrentDirectory;
try {
Program.OriginalFolder = Environment.CurrentDirectory;
} catch {
Program.OriginalFolder = Path.GetDirectoryName(ExePath) ?? "";
}
}

[STAThread]
Expand Down

0 comments on commit e75f33a

Please sign in to comment.