mirror of
https://github.com/Readarr/Readarr
synced 2026-05-05 03:00:35 +02:00
parent
d22ca1fe4f
commit
c61315b90e
1 changed files with 3 additions and 3 deletions
|
|
@ -24,12 +24,12 @@ public RuntimeInfo(IServiceProvider serviceProvider, Logger logger)
|
||||||
serviceProvider.GetStatus(ServiceProvider.SERVICE_NAME) == ServiceControllerStatus.StartPending;
|
serviceProvider.GetStatus(ServiceProvider.SERVICE_NAME) == ServiceControllerStatus.StartPending;
|
||||||
|
|
||||||
//Guarded to avoid issues when running in a non-managed process
|
//Guarded to avoid issues when running in a non-managed process
|
||||||
var entry = Assembly.GetEntryAssembly();
|
var entry = Process.GetCurrentProcess().MainModule;
|
||||||
|
|
||||||
if (entry != null)
|
if (entry != null)
|
||||||
{
|
{
|
||||||
ExecutingApplication = entry.Location;
|
ExecutingApplication = entry.FileName;
|
||||||
IsWindowsTray = OsInfo.IsWindows && entry.ManifestModule.Name == $"{ProcessProvider.READARR_PROCESS_NAME}.exe";
|
IsWindowsTray = OsInfo.IsWindows && entry.ModuleName == $"{ProcessProvider.READARR_PROCESS_NAME}.exe";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue