From 97b9fbf46db8dbfb31fa116fbc212e20c1c39efb Mon Sep 17 00:00:00 2001 From: Zoey Date: Wed, 14 Dec 2022 16:05:09 -0800 Subject: [PATCH] Remove root files --- src/serving.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/serving.rs b/src/serving.rs index 68d506e..eb5d43a 100644 --- a/src/serving.rs +++ b/src/serving.rs @@ -106,10 +106,10 @@ fn remove(builder: &mut SiteBuilder, path: &Path, relative_path: &Path) -> anyho .with_context(|| format!("Failed to remove file at {:?}", to_remove))?; } else if let Ok(_sass_path) = relative_path.strip_prefix(SASS_PATH) { builder.build_sass().context("Failed to rebuild Sass")?; + } else if let Ok(root_path) = relative_path.strip_prefix(ROOT_PATH) { + std::fs::remove_file(builder.build_path.join(root_path))?; } - // Removing root files is not handled for the time being. - Ok(()) }