From ab77d02fd98ceda348974e456b81eb7027d88317 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Tue, 20 Oct 2020 19:31:00 +0200 Subject: [PATCH] filter out dotfiles from listings --- src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 32f69e7..17287b1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -109,7 +109,10 @@ async fn render( if let Ok(entry) = entry { let path = entry.path(); 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