Fix: Preventing cd to .

This commit is contained in:
Denis-Cosmin Nutiu 2017-11-09 23:03:31 +02:00
parent dae792a0f5
commit 045ac76af3

View file

@ -119,7 +119,9 @@ func ChangeDirectoryCommand(c Client, directory string) error {
return ErrStackCast
}
if path == ".." {
if path == "." {
err = nil
} else if path == ".." {
err = ChangeDirectoryToPrevious(stack)
} else {
err = ChangeDirectory(stack, path)