Skip to content
This repository was archived by the owner on Sep 15, 2024. It is now read-only.

Commit 9e31ce3

Browse files
Improve opening mods folder
1 parent dce211c commit 9e31ce3

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

Scripts/Scenes/Menu/UIModLoader.cs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using Godot;
2-
2+
using System;
33
using System.Diagnostics;
44

55
namespace GodotModules.ModLoader
@@ -141,7 +141,18 @@ private void _on_Open_Mods_Folder_pressed()
141141
//AddChild(fileDialogPopup);
142142
//fileDialogPopup.Open();
143143

144-
Process.Start(ModLoader.PathMods);
144+
try
145+
{
146+
using (Process myProcess = new Process())
147+
{
148+
myProcess.StartInfo.FileName = ModLoader.PathMods;
149+
myProcess.Start();
150+
}
151+
}
152+
catch (Exception e)
153+
{
154+
GodotModules.Logger.LogErr(e);
155+
}
145156
}
146157
}
147158
}

0 commit comments

Comments
 (0)