Subject: Re: bin/30735
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: =?iso-8859-1?q?Love_H=F6rnquist_=C5strand?= <lha@netbsd.org>
List: netbsd-bugs
Date: 07/12/2005 18:30:02
The following reply was made to PR bin/30735; it has been noted by GNATS.

From: =?iso-8859-1?q?Love_H=F6rnquist_=C5strand?= <lha@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/30735
Date: Tue, 12 Jul 2005 20:26:20 +0200

 Index: cd.c
 ===================================================================
 RCS file: /sources/netbsd/NetBSD-cvs/src/bin/sh/cd.c,v
 retrieving revision 1.34
 diff -u -r1.34 cd.c
 --- cd.c	14 Nov 2003 20:00:28 -0000	1.34
 +++ cd.c	12 Jul 2005 17:18:36 -0000
 @@ -127,8 +127,11 @@
  				/*
  				 * XXX - rethink
  				 */
 -				if (p[0] == '.' && p[1] == '/' && p[2] != '\0')
 +				if (p[0] == '.' && p[1] == '/' && p[2] != '\0') {
  					p += 2;
 +					while(p[0] == '/')
 +						p++;
 +				}
  				print = strcmp(p, dest);
  			}
  			if (docd(p, print) >= 0)