changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > plan9front / changeset: rc: ignore $cdpath for # device rooted paths (thanks kivik)

changeset 6844: aaae1e23e1f3
parent 6843: 7db92ee68f7e
child 6845: d7191d17e20c
author: cinap_lenrek@felloff.net
date: Fri, 26 Oct 2018 09:52:05 +0200
files: sys/src/cmd/rc/simple.c
description: rc: ignore $cdpath for # device rooted paths (thanks kivik)
     1.1--- a/sys/src/cmd/rc/simple.c
     1.2+++ b/sys/src/cmd/rc/simple.c
     1.3@@ -159,7 +159,7 @@ execcd(void)
     1.4 		pfmt(err, "Usage: cd [directory]\n");
     1.5 		break;
     1.6 	case 2:
     1.7-		if(a->next->word[0]=='/' || cdpath==0)
     1.8+		if(a->next->word[0]=='/' || a->next->word[0]=='#' || cdpath==0)
     1.9 			cdpath = &nullpath;
    1.10 		for(; cdpath; cdpath = cdpath->next){
    1.11 			if(cdpath->word[0] != '\0')