Fixed bad LINQ expression

This commit is contained in:
erri120 2019-11-01 12:06:12 +01:00
parent fa51cd4d69
commit 750dd6f7aa
No known key found for this signature in database
GPG Key ID: A8C0A18D8D4D3135

View File

@ -29,7 +29,7 @@ namespace Wabbajack.Common
public static bool IsMO2Running(string mo2Path)
{
Process[] processList = Process.GetProcesses();
return processList.Select(process => (process.ProcessName == "ModOrganizer" && Path.GetDirectoryName(process.MainModule?.FileName) == mo2Path)).FirstOrDefault();
return processList.Where(process => process.ProcessName == "ModOrganizer").Any(process => Path.GetDirectoryName(process.MainModule?.FileName) == mo2Path);
}
public static string LogFile { get; private set; }