infinite recursion?

This commit is contained in:
Tom Alexander 2024-10-18 21:13:50 -04:00
parent 0da375c529
commit be467c8074
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -4,6 +4,7 @@ use std::sync::Arc;
use std::sync::Mutex;
use super::stylesheet::Stylesheet;
use super::walk_fs::walk_fs;
use crate::cli::parameters::BuildArgs;
use crate::command::build::render::SiteRenderer;
use crate::config::Config;
@ -60,6 +61,8 @@ async fn get_output_directory(config: &Config) -> Result<PathBuf, CustomError> {
}
async fn get_post_directories(config: &Config) -> Result<Vec<PathBuf>, CustomError> {
walk_fs(config.get_posts_directory(), async |entry| Ok(true)).await?;
let mut ret = Vec::new();
if !config.get_posts_directory().exists() {
return Ok(ret);