From 5a1bdb32b07a7d244d9ff17944bddbdca62dbf7c Mon Sep 17 00:00:00 2001 From: Nick Vella Date: Mon, 8 Jul 2019 01:53:29 +1000 Subject: [PATCH] ssg: wizard paths1: show a more helpful error when posts path is empty --- .../WeblogConfigurationWizardPanelStaticSitePaths1.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogConfigurationWizardPanelStaticSitePaths1.cs b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogConfigurationWizardPanelStaticSitePaths1.cs index 07ebd1ca..462aa671 100644 --- a/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogConfigurationWizardPanelStaticSitePaths1.cs +++ b/src/managed/OpenLiveWriter.PostEditor/Configuration/Wizard/WeblogConfigurationWizardPanelStaticSitePaths1.cs @@ -152,9 +152,12 @@ namespace OpenLiveWriter.PostEditor.Configuration.Wizard var draftsPathFull = $"{_localSitePath}\\{DraftsPath}"; // If the Posts path is empty or doesn't exist, display an error - if (PostsPath.Trim().Length == 0 || !Directory.Exists(postsPathFull)) + if (PostsPath.Trim() == string.Empty || !Directory.Exists(postsPathFull)) { - ShowValidationError(textBoxPostsPath, MessageId.FolderNotFound, postsPathFull); + ShowValidationError( + textBoxPostsPath, + MessageId.FolderNotFound, + PostsPath.Trim() == string.Empty ? "Posts path empty" : postsPathFull); // TODO Replace string from with string from resources return false; }