!wip small changes #865

pull/1514/head
Jamie.Rees 7 years ago
parent 1bec8f54b0
commit f6e0c25127

@ -1,10 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
namespace Ombi.Updater
{
@ -156,19 +153,9 @@ namespace Ombi.Updater
return process.MainModule.FileName;
}
private List<System.Diagnostics.Process> GetProcessesByName(string name)
private List<Process> GetProcessesByName(string name)
{
//TODO: move this to an OS specific class
var monoProcesses = Process.GetProcessesByName("mono")
.Union(Process.GetProcessesByName("mono-sgen"))
.Where(process =>
process.Modules.Cast<ProcessModule>()
.Any(module =>
module.ModuleName.ToLower() == name.ToLower() + ".exe"));
var processes = Process.GetProcessesByName(name)
.Union(monoProcesses).ToList();
var processes = Process.GetProcessesByName(name).ToList();
Console.WriteLine("Found {0} processes with the name: {1}", processes.Count, name);
@ -188,7 +175,6 @@ namespace Ombi.Updater
}
}
public class ProcessInfo
{
public int Id { get; set; }

@ -69,6 +69,7 @@
<ItemGroup>
<Folder Include="ClientApp\app\settings\update\" />
<Folder Include="Styles\" />
</ItemGroup>

Loading…
Cancel
Save