diff --git a/crates/nu-engine/src/filesystem/dir_info.rs b/crates/nu-engine/src/filesystem/dir_info.rs index e23f741434..da661b88f1 100644 --- a/crates/nu-engine/src/filesystem/dir_info.rs +++ b/crates/nu-engine/src/filesystem/dir_info.rs @@ -95,6 +95,14 @@ impl DirInfo { path, }; + match std::fs::metadata(&s.path) { + Ok(d) => { + s.size = d.len(); // dir entry size + s.blocks = file_real_size_fast(&s.path, &d).ok().unwrap_or(0); + } + Err(e) => s = s.add_error(e.into()), + }; + match std::fs::read_dir(&s.path) { Ok(d) => { for f in d {