From 0b3d49db32a90a98b8b96f801a54556d0a6da2fa Mon Sep 17 00:00:00 2001 From: Qstick Date: Sun, 16 Apr 2023 17:58:26 -0500 Subject: [PATCH] Remove mono process detection (cherry picked from commit 5a046026725084bc880a7b63d7105dcf4d882128) --- src/NzbDrone.Common/Processes/ProcessProvider.cs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/NzbDrone.Common/Processes/ProcessProvider.cs b/src/NzbDrone.Common/Processes/ProcessProvider.cs index cf96c6839..5d484b54f 100644 --- a/src/NzbDrone.Common/Processes/ProcessProvider.cs +++ b/src/NzbDrone.Common/Processes/ProcessProvider.cs @@ -320,7 +320,7 @@ namespace NzbDrone.Common.Processes processInfo = new ProcessInfo(); processInfo.Id = process.Id; processInfo.Name = process.ProcessName; - processInfo.StartPath = GetExeFileName(process); + processInfo.StartPath = process.MainModule.FileName; if (process.Id != GetCurrentProcessId() && process.HasExited) { @@ -335,16 +335,6 @@ namespace NzbDrone.Common.Processes return processInfo; } - private static string GetExeFileName(Process process) - { - if (process.MainModule.FileName != "mono.exe") - { - return process.MainModule.FileName; - } - - return process.Modules.Cast().FirstOrDefault(module => module.ModuleName.ToLower().EndsWith(".exe")).FileName; - } - private List GetProcessesByName(string name) { //TODO: move this to an OS specific class