From b335617e37c1b1cf29e1159a143803e141aa0f5e Mon Sep 17 00:00:00 2001 From: hvolmer <5054691+hvolmer@users.noreply.github.com> Date: Fri, 27 Mar 2020 12:52:19 -0600 Subject: [PATCH] Added condition to check for _loadedPluginsDirectoryPath when loading plugins --- .../AppServer/MobileControlSystemController.cs | 4 ++++ PepperDashEssentials/PluginLoading/PluginLoading.cs | 11 ++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/PepperDashEssentials/AppServer/MobileControlSystemController.cs b/PepperDashEssentials/AppServer/MobileControlSystemController.cs index 08afb464..b29ca61d 100644 --- a/PepperDashEssentials/AppServer/MobileControlSystemController.cs +++ b/PepperDashEssentials/AppServer/MobileControlSystemController.cs @@ -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); diff --git a/PepperDashEssentials/PluginLoading/PluginLoading.cs b/PepperDashEssentials/PluginLoading/PluginLoading.cs index 032bea2e..e1b0f555 100644 --- a/PepperDashEssentials/PluginLoading/PluginLoading.cs +++ b/PepperDashEssentials/PluginLoading/PluginLoading.cs @@ -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(); + } } } - } ///