about summary refs log tree commit diff
path: root/tvix/store/src/import.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/store/src/import.rs')
-rw-r--r--tvix/store/src/import.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/tvix/store/src/import.rs b/tvix/store/src/import.rs
index d2abb292fc..e71798a6eb 100644
--- a/tvix/store/src/import.rs
+++ b/tvix/store/src/import.rs
@@ -200,8 +200,11 @@ pub fn import_path<
 
     let mut directories: HashMap<PathBuf, proto::Directory> = HashMap::default();
 
-    // TODO: make sure we traverse in sorted order, or insert to parent_directory in sorted order at least.
-    for entry in WalkDir::new(p).follow_links(false).contents_first(true) {
+    for entry in WalkDir::new(p)
+        .follow_links(false)
+        .contents_first(true)
+        .sort_by_file_name()
+    {
         let entry = entry.unwrap();
 
         // process_entry wants an Option<Directory> in case the entry points to a directory.