From 4c6241ca428a863958451ff3a93d5a884a09bb6c Mon Sep 17 00:00:00 2001 From: Gokcehan Date: Sat, 18 May 2019 18:21:16 +0300 Subject: [PATCH] clean path before select Related #167 --- nav.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nav.go b/nav.go index 21a629d..146e444 100644 --- a/nav.go +++ b/nav.go @@ -768,6 +768,9 @@ func (nav *nav) cd(wd string) error { } func (nav *nav) sel(path string) error { + path = strings.Replace(path, "~", gUser.HomeDir, -1) + path = filepath.Clean(path) + lstat, err := os.Stat(path) if err != nil { return fmt.Errorf("select: %s", err)