From 64c8506dd2ff347f7c79db370be25fe6a9864c82 Mon Sep 17 00:00:00 2001 From: Josh Megnauth Date: Mon, 28 Jul 2025 00:46:20 -0400 Subject: [PATCH] Decode URL encoded recents bookmark File paths are URL encoded in the recently-used.xbel file. Paths with spaces (or whatever) need to be decoded or else the Recents tab skips those entries. --- src/tab.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/tab.rs b/src/tab.rs index 8e764cc..0bf3df3 100644 --- a/src/tab.rs +++ b/src/tab.rs @@ -1138,8 +1138,14 @@ pub fn scan_trash(sizes: IconSizes) -> Vec { } fn uri_to_path(uri: String) -> Option { - //TODO support for external drive or cloud? - uri.strip_prefix("file://").map(PathBuf::from) + uri.parse::().ok().and_then(|url| { + //TODO support for external drive or cloud? + if url.scheme() == "file" { + url.to_file_path().ok() + } else { + None + } + }) } pub fn scan_recents(sizes: IconSizes) -> Vec {