diff options
Diffstat (limited to '')
-rw-r--r-- | tvix/store/src/import.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tvix/store/src/import.rs b/tvix/store/src/import.rs index d2abb292fcce..e71798a6eb4c 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. |