From be97b7a594163192edf47706baf75d5d42bcb68f Mon Sep 17 00:00:00 2001 From: T Date: Thu, 3 Apr 2025 10:24:19 -0600 Subject: fix gopher empty path handling --- actions.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/actions.go b/actions.go index f95825a..5aa054a 100644 --- a/actions.go +++ b/actions.go @@ -122,13 +122,13 @@ func purgeOldHistory(state *BrowserState) { } func gopherURL(u *url.URL) (string, sliderule.Status) { - if u.Scheme != "gopher" || !strings.HasPrefix(u.Path, "/") { + if u.Scheme != "gopher" { return u.String(), 0 } var itemType byte var path string - if u.Path == "/" { + if u.Path == "" || u.Path == "/" { itemType = '1' path = u.Path } else { -- cgit v1.2.3