From 330ad13e280fd505226b3b0182bfebe4e7a63a45 Mon Sep 17 00:00:00 2001 From: Anhad Singh Date: Sun, 2 Feb 2025 13:58:24 +1100 Subject: [PATCH] fix(cook/fetch): check if directory does not exist Signed-off-by: Anhad Singh --- src/bin/cook.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/cook.rs b/src/bin/cook.rs index 5d48a10b..94bc4d99 100644 --- a/src/bin/cook.rs +++ b/src/bin/cook.rs @@ -228,7 +228,7 @@ fn fetch(recipe_dir: &Path, source: &Option) -> Result { - if modified_dir(Path::new(path))? > modified_dir(&source_dir)? { + if !source_dir.is_dir() || modified_dir(Path::new(path))? > modified_dir(&source_dir)? { eprintln!("[DEBUG]: {} is newer than {}", path, source_dir.display()); copy_dir_all(path, &source_dir).map_err(|e| { format!(