From 5d3a6c4174ca76411fb0124a31f22a7df9e94756 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Fri, 18 Oct 2024 21:15:23 -0400 Subject: [PATCH] Also infinite. --- src/command/build/runner.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/command/build/runner.rs b/src/command/build/runner.rs index b8361dc..a36c9af 100644 --- a/src/command/build/runner.rs +++ b/src/command/build/runner.rs @@ -17,6 +17,7 @@ use crate::intermediate::PageInput; use crate::intermediate::Registry; use include_dir::include_dir; use include_dir::Dir; +use tokio::fs::DirEntry; static DEFAULT_STYLESHEETS: Dir = include_dir!("$CARGO_MANIFEST_DIR/default_environment/stylesheet"); @@ -60,8 +61,12 @@ async fn get_output_directory(config: &Config) -> Result { Ok(output_directory) } +async fn filter_to_post_directories(entry: &DirEntry) -> Result { + Ok(true) +} + async fn get_post_directories(config: &Config) -> Result, CustomError> { - walk_fs(config.get_posts_directory(), async |entry| Ok(true)).await?; + walk_fs(config.get_posts_directory(), filter_to_post_directories).await?; let mut ret = Vec::new(); if !config.get_posts_directory().exists() {