Skip to content

Commit

Permalink
Remove mono process detection
Browse files Browse the repository at this point in the history
(cherry picked from commit 5a046026725084bc880a7b63d7105dcf4d882128)
  • Loading branch information
Qstick authored and mynameisbogdan committed May 26, 2023
1 parent ce34940 commit b8793d8
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/NzbDrone.Common/Processes/ProcessProvider.cs
Expand Up @@ -313,7 +313,7 @@ private ProcessInfo ConvertToProcessInfo(Process process)
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)
{
Expand All @@ -328,16 +328,6 @@ private ProcessInfo ConvertToProcessInfo(Process process)
return processInfo;
}

private static string GetExeFileName(Process process)
{
if (process.MainModule.FileName != "mono.exe")
{
return process.MainModule.FileName;
}

return process.Modules.Cast<ProcessModule>().FirstOrDefault(module => module.ModuleName.ToLower().EndsWith(".exe")).FileName;
}

private List<Process> GetProcessesByName(string name)
{
//TODO: move this to an OS specific class
Expand Down

0 comments on commit b8793d8

Please sign in to comment.