From owner-freebsd-current Sat Jul 8 01:28:43 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id BAA26461 for current-outgoing; Sat, 8 Jul 1995 01:28:43 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.34]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id BAA26420 for ; Sat, 8 Jul 1995 01:28:32 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id SAA22164; Sat, 8 Jul 1995 18:23:14 +1000 Date: Sat, 8 Jul 1995 18:23:14 +1000 From: Bruce Evans Message-Id: <199507080823.SAA22164@godzilla.zeta.org.au> To: bde@zeta.org.au, imb@scgt.oz.au Subject: Re: bin/594: "mkdir -p some/path/" fails to create last path component when path has trailing slash Cc: current@freebsd.org Sender: current-owner@freebsd.org Precedence: bulk >> > "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