Merge pull request #81 from PepperDash/bugfix/load-plugins-crash-with-no-plugins

Added condition to check for _loadedPluginsDirectoryPath when loading plugins
This commit is contained in:
Andrew Welker 2020-03-30 10:52:22 -06:00 committed by GitHub
commit aaf6d0a21a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 5 deletions

View file

@ -290,6 +290,10 @@ namespace PepperDash.Essentials
SystemUuid);
}
}
else
{
Debug.Console(0, "Authorization failed, code {0}: {1}", r.Code, r.ContentString);
}
}
else
Debug.Console(0, this, "Error {0} in authorizing system", e);

View file

@ -415,14 +415,15 @@ namespace PepperDash.Essentials
// Deal with any .cplz files
UnzipAndMoveCplzArchives();
// Load the assemblies from the loadedPlugins folder into the AppDomain
LoadPluginAssemblies();
if(Directory.Exists(_loadedPluginsDirectoryPath) {
// Load the assemblies from the loadedPlugins folder into the AppDomain
LoadPluginAssemblies();
// Load the types from any custom plugin assemblies
LoadCustomPluginTypes();
// Load the types from any custom plugin assemblies
LoadCustomPluginTypes();
}
}
}
}
/// <summary>