Skip to content

Commit

Permalink
Fixed process filters not ignoring .exe extension
Browse files Browse the repository at this point in the history
  • Loading branch information
ManlyMarco committed Nov 18, 2020
1 parent e64304a commit b229517
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions BepInEx.IPALoader/IllusionInjector/PluginManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,14 @@ private static IEnumerable<IPlugin> LoadPluginsFromFile(string file, string exeN
IPALoader.Logger.LogWarning($"[WRN] Could not load {t.FullName} because types mismatch. Please check if you have multiple instances of IPA installed.");
continue;
}

string[] filter = null;

if (pluginInstance is IEnhancedPlugin plugin)
filter = plugin.Filter;

if (filter == null || filter.Contains(exeName, StringComparer.OrdinalIgnoreCase))
var exeNameTrimmed = exeName.ToLower().Replace(".exe", "").Trim();
if (filter == null || filter.Any(f => f.ToLower().Replace(".exe", "").Trim() == exeNameTrimmed))
plugins.Add(pluginInstance);
}
catch (Exception e)
Expand Down

0 comments on commit b229517

Please sign in to comment.