fix root; fix directory creation

This commit is contained in:
Aaron Manning
2025-09-29 14:42:07 +10:00
parent 7ce0ae5830
commit b016bd4387
2 changed files with 5 additions and 2 deletions

View File

@@ -162,7 +162,10 @@ pub(crate) fn sync(
if !target.exists() {
println!("[info] copying from {:?} to {:?}.", source, target);
fs::create_dir_all(target.parent().unwrap())?;
let parent = target.parent().unwrap();
if !parent.exists() {
fs::create_dir_all(parent)?;
}
fs::copy(source, target)?;
}
}