NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: standards/59565: sh(1): cd "" must fail



The following reply was made to PR standards/59565; it has been noted by GNATS.

From: Robert Elz <kre%munnari.OZ.AU@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: standards/59565: sh(1): cd "" must fail
Date: Sat, 09 Aug 2025 05:49:15 +0700

 It has been well over a week now, and no comments on
 this issue have appeared.
 
 So (early) next week I will commit a change which will make
 	cd ''
 generate an error, instead of turning itself into
 	cd .
 
 It is a very simple change (already tested) - though I
 will also commit a separate change which will improve the
 error message produced - initially it will just be
 
 	cd: can't cd to 
 
 which looks truncated, but is just the same as if one does:
 
 	cd /foo/bar
 	cd: can't cd to /foo/bar
 
 now, with, naturally, /foo/bar replaced by the empty string.
 
 After the improvement (2nd commit) that (and similar) will become:
 
 	$ cd ''
 	cd: Can't cd to "": No such file or directory
 	$ cd /foo/bar
 	cd: Can't cd to "/foo/bar": No such file or directory
 	$ mkdir -p /tmp/a/b
 	$ chmod 0 /tmp/a
 	$ cd /tmp/a/b
 	cd: Can't cd to "/tmp/a/b": Permission denied
 	$ cd /netbsd
 	cd: Can't cd to "/netbsd": Not a directory
 
 If anyone has any objections, send them to this PR now
 (ie: reply to this message).
 
 kre
 


Home | Main Index | Thread Index | Old Index