Date: Sat, 03 Feb 2001 15:02:03 -0600 From: seebs@plethora.net (Peter Seebach) To: hackers@freebsd.org Subject: Re: Trailing slashes and rmdir - POLA broken Message-ID: <200102032102.f13L23P01850@guild.plethora.net> In-Reply-To: Your message of "Sun, 04 Feb 2001 06:46:32 %2B1000." <nospam-3a7c6e285f01132@maxim.gbch.net>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <nospam-3a7c6e285f01132@maxim.gbch.net>, Greg Black writes:
> $ rmdir bar/
> $ ls -l
> total 0
> lrwxrwx--- 1 gjb wheel 3 Feb 4 06:35 bar -> foo
> $
>Oops, "rmdir bar/" ended up as "rmdir foo" and left the useless
>symlink bar in place.
Yup.
>BSD/OS gives that silly "Is a directory" error message for the
>"rmdir bar/" case, but at least it does not actually do anything.
>I don't think FreeBSD should do what it does. Is there any good
>reason to preserve this behaviour?
History. In earlier BSD, 'foo/' meant the same thing as 'foo/""', that
is to say, "foo/.". ("" => ".", sometimes). So, "bar/" implies a
dereferencing of the link.
I believe the silly "Is a directory" message will go away, but I don't think
we will end up following the link in that case, although it's still being
debated.
-s
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102032102.f13L23P01850>
