Skip to content

Commit e75f33a

Browse files
committed
Linux: Fixed startup crash when executed from path that no longer exists
1 parent 3cbe2be commit e75f33a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

UI/Program.cs

+5-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ class Program
3030

3131
static Program()
3232
{
33-
Program.OriginalFolder = Environment.CurrentDirectory;
33+
try {
34+
Program.OriginalFolder = Environment.CurrentDirectory;
35+
} catch {
36+
Program.OriginalFolder = Path.GetDirectoryName(ExePath) ?? "";
37+
}
3438
}
3539

3640
[STAThread]

0 commit comments

Comments
 (0)