Fix: Preventing cd to .
This commit is contained in:
parent
dae792a0f5
commit
045ac76af3
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue