From 8e46f7fd0410a036222da69a6b44d24785117da9 Mon Sep 17 00:00:00 2001 From: dvkt Date: Fri, 27 Dec 2019 11:58:16 -0800 Subject: [PATCH] trailing slash assumptions --- src/menu.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/menu.rs b/src/menu.rs index bb304ac..290f8f9 100644 --- a/src/menu.rs +++ b/src/menu.rs @@ -667,10 +667,12 @@ impl Menu { // selector if parts.len() > 1 { let mut sel = parts[1].to_string(); - if !sel.starts_with('/') { - sel.insert(0, '/'); + if !sel.is_empty() { + if !sel.starts_with('/') { + sel.insert(0, '/'); + } + url.push_str(&sel); } - url.push_str(&sel); } lines.push(Line { name,