From 372f9e81e5179b3a5d6c81bc2fae406155713529 Mon Sep 17 00:00:00 2001 From: Kate Goldenring Date: Fri, 21 Feb 2025 11:17:52 -0800 Subject: [PATCH] fix: support empty files directories Signed-off-by: Kate Goldenring --- crates/loader/src/local.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/crates/loader/src/local.rs b/crates/loader/src/local.rs index 628c4f80d4..d5c1c631d3 100644 --- a/crates/loader/src/local.rs +++ b/crates/loader/src/local.rs @@ -548,7 +548,16 @@ impl LocalLoader { .with_context(|| format!("Invalid exclude_files glob pattern {pattern:?}")) }) .collect::>>()?; - + + crate::fs::create_dir_all(&dest_root) + .await + .with_context(|| { + format!( + "Failed to create parent directory {}", + quoted_path(&dest_root) + ) + })?; + for path_res in paths { let src = path_res?; if !src.is_file() {