ssg: wizard paths1: show a more helpful error when posts path is empty

This commit is contained in:
Nick Vella 2019-07-08 01:53:29 +10:00
parent 505ffa4380
commit 5a1bdb32b0
1 changed files with 5 additions and 2 deletions

View File

@ -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;
}