Don't crash if CDPATH is "./"

Fixes #5887.
This commit is contained in:
Fabian Homborg
2019-05-22 21:46:53 +02:00
parent 363652ad76
commit 1faffa515e
3 changed files with 10 additions and 1 deletions

View File

@@ -72,6 +72,9 @@ cd $base
test $PWD = $base; and echo Gone to base
cd linkhome
test $PWD = $base/linkhome; and echo Gone to linkhome via implicit . in CDPATH
set -g CDPATH ./
cd $base
test $PWD = $base; and echo No crash with ./ CDPATH
# cd back before removing the test directory again.
cd $oldpwd

View File

@@ -29,3 +29,4 @@ BogusPWD test 2 succeeded
Gone to linkhome via CDPATH
Gone to base
Gone to linkhome via implicit . in CDPATH
No crash with ./ CDPATH