filter out dotfiles from listings

This commit is contained in:
Tomáš Mládek 2020-10-20 19:31:00 +02:00
parent 3306f55c0d
commit ab77d02fd9

View file

@ -109,7 +109,10 @@ async fn render(
if let Ok(entry) = entry { if let Ok(entry) = entry {
let path = entry.path(); let path = entry.path();
if path.is_file() { if path.is_file() {
return Some(path.strip_prefix(&state.garden_dir).unwrap().to_path_buf()); let stripped_path = path.strip_prefix(&state.garden_dir).unwrap().to_path_buf();
if !stripped_path.to_str().unwrap().starts_with(".") {
return Some(stripped_path);
}
} }
} }
None None