From c59194b910f47a181bc94b0915bbf4e439a8c2c6 Mon Sep 17 00:00:00 2001 From: Lior Banai <36262995+LiorBanai@users.noreply.github.com> Date: Wed, 22 Apr 2020 19:19:52 +0300 Subject: [PATCH] update --- Analogy/Managers/FactoriesManager.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Analogy/Managers/FactoriesManager.cs b/Analogy/Managers/FactoriesManager.cs index 3f8a753d..5f5af8d2 100644 --- a/Analogy/Managers/FactoriesManager.cs +++ b/Analogy/Managers/FactoriesManager.cs @@ -185,14 +185,17 @@ private ExternalDataProviders() { try { - analogyAssemblies.AddRange(Directory.EnumerateFiles(folder, @"*Analogy.LogViewer.*.dll", SearchOption.TopDirectoryOnly).ToList()); + if (Directory.Exists(folder)) + analogyAssemblies.AddRange(Directory.EnumerateFiles(folder, @"*Analogy.LogViewer.*.dll", + SearchOption.TopDirectoryOnly).ToList()); } catch (Exception e) { - AnalogyLogger.Instance.LogException(e,nameof(ExternalDataProviders),$"Error probing folder {folder}. Error: {e.Message}"); + AnalogyLogger.Instance.LogException(e, nameof(ExternalDataProviders), + $"Error probing folder {folder}. Error: {e.Message}"); } } - + } foreach (string aFile in analogyAssemblies)