Skip to content

Commit 0322e32

Browse files
author
Neurs
committed
✨ Avoid spawning another process, causing conflict
1 parent 9cef96e commit 0322e32

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Program.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ internal static partial class Program
99
/// </summary>
1010
static void Main()
1111
{
12+
bool checkProcess = Process.GetProcessesByName(Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetEntryAssembly()!.Location)).Length > 1;
13+
14+
if (checkProcess)
15+
{
16+
return;
17+
}
18+
1219
ApplicationConfiguration.Initialize();
1320
Application.Run(new Yeeter());
1421
}

0 commit comments

Comments
 (0)