Skip to content

Commit e5f3a27

Browse files
hemreariPeltoche
authored andcommitted
show current and parent directory issue#112
1 parent fa6146c commit e5f3a27

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/meta/mod.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,14 @@ impl Meta {
5656
println!("cannot access '{}': {}", path.display(), err);
5757
return Ok(meta);
5858
}
59+
let mut content = Vec::new();
60+
61+
let current_meta = Self::from_path(&PathBuf::from("."))?;
62+
let parent_meta = Self::from_path(&PathBuf::from(".."))?;
63+
64+
content.push(current_meta);
65+
content.push(parent_meta);
5966

60-
let mut content = Vec::new();
6167
for entry in meta.path.read_dir()? {
6268
let path = entry?.path();
6369

0 commit comments

Comments
 (0)