On Mon, 18 Sep 2000, David Brownlee wrote:
> On Sun, 17 Sep 2000, Warner Losh wrote:
> > It should ENOENT if the directory doesn't exist and EEXIST if it does.
> >
> > Why? If the directory doesn't exist for "/foo/bar/", then /foo/bar
> > won't exist, and return the error. If it does, then "/foo/bar/."
> > exists. I believe that the standard states that null path components
> > are treated as '.'. I don't have the standards docs handy, but recall
> > this from past discussions on related topics.
No, in SUSv2, multiple slashes are the same as one slash, not '.', and
trailing slashes refer to the directory. The exception is that the
presence of exactly two leading slashes is implementation dependent.
I'll let someone who has a copy of the standard make a more difinitive
statement on what POSIX thinks, but from what I've read I believe that
accepting trailing slashes is allowed by POSIX.
> Would you have a document and section number for this - I'd like
> to add a reference to the manpage to ensure this is settled for
> the future - thanks :)
http://www.cse.unsw.edu.au/~egalanos/susv2/xbd/glossary.html#tag_004_000_196
Matthew Orgass
darkstar@pgh.net