2
0
mirror of https://github.com/xvxx/phetch synced 2024-11-05 00:00:58 +00:00

trailing slash assumptions

This commit is contained in:
dvkt 2019-12-27 11:58:16 -08:00
parent 6080782cf4
commit 8e46f7fd04

View File

@ -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,