clean path before select

Related #167
This commit is contained in:
Gokcehan 2019-05-18 18:21:16 +03:00
parent 8388b4f385
commit 4c6241ca42

3
nav.go
View File

@ -768,6 +768,9 @@ func (nav *nav) cd(wd string) error {
} }
func (nav *nav) sel(path 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) lstat, err := os.Stat(path)
if err != nil { if err != nil {
return fmt.Errorf("select: %s", err) return fmt.Errorf("select: %s", err)