Optimize LoadAssemblies()

We can be smart about it and avoid loading the same assemblies twice
This commit is contained in:
Archi
2021-07-04 18:33:24 +02:00
parent c3c1eb8295
commit dcacdd802c

View File

@@ -218,7 +218,7 @@ namespace ArchiSteamFarm.Plugins {
string customPluginsPath = Path.Combine(Directory.GetCurrentDirectory(), SharedInfo.PluginsDirectory);
if (Directory.Exists(customPluginsPath)) {
if ((pluginsPath != customPluginsPath) && Directory.Exists(customPluginsPath)) {
HashSet<Assembly>? loadedAssemblies = LoadAssembliesFrom(customPluginsPath);
if (loadedAssemblies?.Count > 0) {