rc: ignore $cdpath for # device rooted paths (thanks kivik)

This commit is contained in:
cinap_lenrek 2018-10-26 09:52:05 +02:00
parent 05021e0579
commit 1a55b8d1f0

View file

@ -159,7 +159,7 @@ execcd(void)
pfmt(err, "Usage: cd [directory]\n");
break;
case 2:
if(a->next->word[0]=='/' || cdpath==0)
if(a->next->word[0]=='/' || a->next->word[0]=='#' || cdpath==0)
cdpath = &nullpath;
for(; cdpath; cdpath = cdpath->next){
if(cdpath->word[0] != '\0')