From c61315b90e442ce6afb552dfd4db7362d2824f3f Mon Sep 17 00:00:00 2001 From: ta264 Date: Thu, 11 Feb 2021 22:06:16 +0000 Subject: [PATCH] Fixed: Restart button in UI Fixes #633 --- src/NzbDrone.Common/EnvironmentInfo/RuntimeInfo.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfo.cs b/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfo.cs index 218b52ea3..094ca7a57 100644 --- a/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfo.cs +++ b/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfo.cs @@ -24,12 +24,12 @@ public RuntimeInfo(IServiceProvider serviceProvider, Logger logger) serviceProvider.GetStatus(ServiceProvider.SERVICE_NAME) == ServiceControllerStatus.StartPending; //Guarded to avoid issues when running in a non-managed process - var entry = Assembly.GetEntryAssembly(); + var entry = Process.GetCurrentProcess().MainModule; if (entry != null) { - ExecutingApplication = entry.Location; - IsWindowsTray = OsInfo.IsWindows && entry.ManifestModule.Name == $"{ProcessProvider.READARR_PROCESS_NAME}.exe"; + ExecutingApplication = entry.FileName; + IsWindowsTray = OsInfo.IsWindows && entry.ModuleName == $"{ProcessProvider.READARR_PROCESS_NAME}.exe"; } }