mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-17 23:44:17 +08:00
fix(cook/fetch): check if directory does not exist
Signed-off-by: Anhad Singh <andypython@protonmail.com>
This commit is contained in:
parent
9b1e5834ae
commit
330ad13e28
@ -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!(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user