From f2f02abad15f85f88a24f2aca4b6c90dc3b213fc Mon Sep 17 00:00:00 2001 From: Marek Grochowski Date: Thu, 22 Oct 2020 18:56:54 +0200 Subject: [PATCH] Check for an empty dir variable added If the preferences.sessionSaveDirectory variable isn't set, then there is on every open and close action of LogExpert an error message thrown that a dir path cannot be empty. Therefore, it should be checked whether the variable is empty. --- src/LogExpert/Classes/Persister/Persister.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LogExpert/Classes/Persister/Persister.cs b/src/LogExpert/Classes/Persister/Persister.cs index de61a6da..42dd2fee 100644 --- a/src/LogExpert/Classes/Persister/Persister.cs +++ b/src/LogExpert/Classes/Persister/Persister.cs @@ -165,7 +165,7 @@ private static string BuildPersisterFileName(string logFileName, Preferences pre file = dir + Path.DirectorySeparatorChar + BuildSessionFileNameFromPath(logFileName); break; } - if (!Directory.Exists(dir)) + if (!string.IsNullOrWhiteSpace(dir) && !Directory.Exists(dir)) { try {