Skip to content

Commit

Permalink
Fix already running check in publish mode
Browse files Browse the repository at this point in the history
  • Loading branch information
reagcz committed Oct 5, 2022
1 parent c36c7cc commit e2319b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion IdeapadToolkit/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ protected override void OnStartup(StartupEventArgs e)
base.OnStartup(e);
Container container = _container = new Container();
ConfigureServices(container);
bool exists = Process.GetProcessesByName(Path.GetFileNameWithoutExtension(Assembly.GetEntryAssembly()?.Location)).Length > 1;
bool exists = Process.GetProcessesByName(Path.GetFileNameWithoutExtension(Environment.ProcessPath)).Length > 1;
if (exists && !e.Args.Contains("ignoreRunning"))
{
MessageBox.Show("Already running!", "", MessageBoxButton.OK, MessageBoxImage.Asterisk);
Expand Down

0 comments on commit e2319b6

Please sign in to comment.