Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Jul 1995 18:23:14 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, imb@scgt.oz.au
Cc:        current@freebsd.org
Subject:   Re: bin/594: "mkdir -p some/path/" fails to create last path component when path has trailing slash
Message-ID:  <199507080823.SAA22164@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> >	"mkdir -p some/path/" fails to create last path component when
>> >	path has trailing slash
> 
>> Note that ordinary mkdir(1) and mkdir(2) also fail to create "foo/"
>> although POSIX specifies that paths to directories may have an optional
>> trailing slash.  I had this fixed in 1.1.5.  There is an old PR about it.

>The problem is more widespread .. "rmdir foo/" fails and complains of "foo
>is a directory" (!) and "rm -rf foo/" does likewise,

Yes, the handling of trailing slashes is broken in all cases.  "foo/"
sometimes means "foo/." but sometimes it is rejected without even
looking at the type of the file "foo".  E.g., `touch /etc/passwd/' says
that /etc/passwd/ is a directory!

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199507080823.SAA22164>