From 5d7c2054b384c5d7e9e327cb63a36fe43445e93f Mon Sep 17 00:00:00 2001 From: unspeaker Date: Mon, 10 Mar 2025 12:15:27 +0200 Subject: [PATCH] collect unknowns too --- src/model.rs | 10 +++++++++- src/view.rs | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/model.rs b/src/model.rs index 005cb69..c6fd0b5 100644 --- a/src/model.rs +++ b/src/model.rs @@ -103,10 +103,15 @@ pub enum EntryInfo { author: Option, invalid: bool, }, + Unknown { + hash: Arc, + file_type: &'static FileType, + } } impl Entry { pub fn new (root: &impl AsRef, entry: &DirEntry) -> Perhaps { + println!("{}", entry.path().display()); if entry.path().is_dir() { Self::new_dir(root, entry) } else if entry.path().is_file() { @@ -168,7 +173,10 @@ impl Entry { author: None, invalid: false, }, - _ => return Ok(None) + _ => EntryInfo::Unknown { + file_type, + hash: hash.into(), + } }, })) } diff --git a/src/view.rs b/src/view.rs index 26aff79..186ac39 100644 --- a/src/view.rs +++ b/src/view.rs @@ -130,7 +130,7 @@ impl Entry { } else if self.is_mus() { "" } else { - " " + "⁇" } } fn style (&self) -> Option