Subject: Re: more mkdir foo/ problems
To: None <tech-kern@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 02/06/2000 12:30:34
> java.io.IOException: images/: could not create directory

> It looks like this should be sysctlable for compatability testing.

> We must first consider current internal inconsistancies.  For
> example, while mkdir("foo/") fails, rmdir("foo/") does not, and
> neither does stat("foo/",..) [...] [y]et rmdir("foo/.") fails

stat() I think can be discounted; it is an operation on the directory,
not on pathnames.

This appears to be an artifact of the way lookup()
[sys/kern/vfs_lookup.c] is structured.  After picking out a pathname
component to look up, it strips following slashes and *then* checks to
see if it's the last component.  I think it might fix this
inconsistency to move the loop that strips slashes and the associated
test to see if we need to set REQUIREDIR to just after the following
check that may set ISLASTCN.

> clearly showing that "foo/" and "foo/." are conceptually different,

Uh, no.  Clearly showing that the implementation treats them as
different.  I think it shouldn't, because I think they *aren't*
conceptually different.

What say our standards mavens?  Any standards dicta on this?

					der Mouse

			       mouse@rodents.montreal.qc.ca
		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B