Skip to content
Snippets Groups Projects
Verified Commit 330ad13e authored by Anhad Singh's avatar Anhad Singh :crab:
Browse files

fix(cook/fetch): check if directory does not exist

parent 9b1e5834
No related branches found
No related tags found
No related merge requests found
......@@ -228,7 +228,7 @@ fn fetch(recipe_dir: &Path, source: &Option<SourceRecipe>) -> Result<PathBuf, St
}
}
Some(SourceRecipe::Path { path }) => {
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!(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment