Browse Source

Fix process filtering not working correctly

ghorsington 5 years ago
parent
commit
c5bcb24283
1 changed files with 1 additions and 3 deletions
  1. 1 3
      BepInEx/Bootstrap/Chainloader.cs

+ 1 - 3
BepInEx/Bootstrap/Chainloader.cs

@@ -97,7 +97,7 @@ namespace BepInEx.Bootstrap
 			//Perform a filter for currently running process
 			var filters = BepInProcess.FromCecilType(type);
 
-			bool invalidProcessName = filters.Any(x => x.ProcessName.ToLower().Replace(".exe", "") == Paths.ProcessName);
+			bool invalidProcessName = filters.Any(x => !string.Equals(x.ProcessName.Replace(".exe", ""), Paths.ProcessName, StringComparison.InvariantCultureIgnoreCase));
 
 			if (invalidProcessName)
 			{
@@ -107,8 +107,6 @@ namespace BepInEx.Bootstrap
 
 			var dependencies = BepInDependency.FromCecilType(type);
 
-			Logger.LogInfo($"Type path: {type.Module.FileName}");
-
 			return new PluginInfo
 			{
 				Metadata = metadata,