From 12f0f0da68eda83cfda64f040e86283fc03ce29d Mon Sep 17 00:00:00 2001 From: Gokcehan Date: Fri, 18 Mar 2022 21:59:11 +0300 Subject: [PATCH] handle trailing slash in PWD properly cc #558 --- nav.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nav.go b/nav.go index 03cfc42..a42c1dc 100644 --- a/nav.go +++ b/nav.go @@ -447,6 +447,8 @@ func (nav *nav) checkDir(dir *dir) { func (nav *nav) getDirs(wd string) { var dirs []*dir + wd = filepath.Clean(wd) + for curr, base := wd, ""; !isRoot(base); curr, base = filepath.Dir(curr), filepath.Base(curr) { dir := nav.loadDir(curr) dir.sel(base, nav.height)