clean path before changing directory

This commit is contained in:
Gokcehan committed 2016-10-02 00:39:03 +03:00
1 parent 7fe72c188f
commit d66eb7349d
2 files changed
+2

No files matched your search

+1
View File
@@ -326,6 +326,7 @@ func (nav *Nav) top() {
func (nav *Nav) cd(wd string) error {
wd = strings.Replace(wd, "~", envHome, -1)
wd = filepath.Clean(wd)
if !filepath.IsAbs(wd) {
wd = filepath.Join(nav.currDir().path, wd)