Also infinite.

This commit is contained in:
Tom Alexander 2024-10-18 21:15:23 -04:00
parent be467c8074
commit 5d3a6c4174
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -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<PathBuf, CustomError> {
Ok(output_directory)
}
async fn filter_to_post_directories(entry: &DirEntry) -> Result<bool, CustomError> {
Ok(true)
}
async fn get_post_directories(config: &Config) -> Result<Vec<PathBuf>, 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() {