about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tvix/castore/src/import.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/tvix/castore/src/import.rs b/tvix/castore/src/import.rs
index 65f2a30eeae2..e17338756b87 100644
--- a/tvix/castore/src/import.rs
+++ b/tvix/castore/src/import.rs
@@ -189,6 +189,10 @@ pub async fn ingest_path<P: AsRef<Path> + Debug>(
         .await?;
 
         if entry.depth() == 0 {
+            // Make sure all the directories are flushed.
+            if entry.file_type().is_dir() {
+                directory_putter.close().await?;
+            }
             return Ok(node);
         } else {
             // calculate the parent path, and make sure we register the node there.