Fix output directory structure builds

Fixed a bug which created multiple subdirectories with blogs containing
more than one article.
This commit is contained in:
luca0N! 2022-03-03 18:39:30 -03:00
parent 5ecf95a4bf
commit 7eb540099e
Signed by: luca0N
GPG Key ID: 2E7B4655CF16D7D6
1 changed files with 2 additions and 1 deletions

View File

@ -134,7 +134,8 @@ void build_blog_structure(std::string const &path, std::string const &prefix, st
// directories later as needed.
try {
// Create directory for the year of this article if it doesn't exist.
std::filesystem::path oad = obp /= year; // Output Article Directory
std::filesystem::path oad = obp;
oad /= year; // Output Article Directory
if (!std::filesystem::exists(oad)) std::filesystem::create_directory(oad);
// Do the same for the article month.