From 06782b5ed1527b1d4eb6e26feb5a260415efe1af Mon Sep 17 00:00:00 2001 From: lukeflo Date: Sun, 25 May 2025 14:21:17 +0200 Subject: enhancement from PR \#28 discussion + Collect basenames and filepaths from pdf dir into HashMap + Identical basenames in different subdirs are possible + Collected into Vector + TODO: implement selection for multiple files (yank and open) --- src/bibiman.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/bibiman.rs') diff --git a/src/bibiman.rs b/src/bibiman.rs index ef5dfe3..646a078 100644 --- a/src/bibiman.rs +++ b/src/bibiman.rs @@ -557,7 +557,8 @@ impl Bibiman { let url = app::prepare_weblink(object); app::open_connected_link(cfg, &url)?; } else if self.popup_area.popup_list[popup_idx].contains("File") { - let object = self.entry_table.entry_table_items[entry_idx].filepath(); + // TODO: Selection for multiple files + let object = self.entry_table.entry_table_items[entry_idx].filepath()[0]; app::open_connected_file(cfg, object)?; } else { eprintln!("Unable to find ressource to open"); @@ -604,7 +605,7 @@ impl Bibiman { .filepath .clone(); if let Some(p) = path { - let p = p.as_os_str().to_str(); + let p = p[0].as_os_str().to_str(); if let Some(p) = p { Bibiman::yank_text(p); self.popup_area.popup_message( -- cgit v1.2.3