ssg: StaticSitePost: set FilePathById on post load from file

This commit is contained in:
Nick Vella 2019-07-19 01:47:26 +10:00
parent 51a001841d
commit ea9eaf32f9
1 changed files with 5 additions and 0 deletions

View File

@ -125,6 +125,8 @@ namespace OpenLiveWriter.BlogClient.Clients.StaticSite
}).DefaultIfEmpty(null).FirstOrDefault();
return _filePathById = (foundFile == null ? null : Path.Combine(SiteConfig.LocalSitePath, SiteConfig.PostsPath, foundFile));
}
protected set => _filePathById = value;
}
/// <summary>
@ -269,6 +271,9 @@ namespace OpenLiveWriter.BlogClient.Clients.StaticSite
// Throw error if post does not have an ID
if (Id == null || Id == string.Empty) throw new BlogClientException("Post load error", "Post does not have an ID");
// FilePathById will be the path we loaded this post from
FilePathById = postFilePath;
// Load the content into blogpost
BlogPost.Contents = postContent;