about summary refs log tree commit diff
path: root/tvix/castore/src/import.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/castore/src/import.rs')
-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 65f2a30eea..e17338756b 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.