NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/45425: how to restore traditional unix behaviour for slashes on the end of pathnames



The following reply was made to PR kern/45425; it has been noted by GNATS.

From: David Holland <dholland-bugs%netbsd.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: kern/45425: how to restore traditional unix behaviour for
 slashes on the end of pathnames
Date: Sat, 5 Nov 2011 16:55:55 +0000

 On Tue, Oct 04, 2011 at 07:55:00PM +0000, Greg A. Woods wrote:
  >     Traditional Unix, from at least V5 onwards and right through to
  >     the end (V10) and perhaps beyond (plan 9?), always treated
  >     slashes (in groups of one or more) in pathnames purely as
  >     separators between components, and thus trailing slashes were
  >     always effectively ignored (treated as NULs).
  > 
  >     At some point BSD changed this interpretation of trailing
  >     slashes.  Apparently they forgot that appending "/." was the
  >     correct and obvious way to specify that the final component of a
  >     pathname must be a directory.
 
 That doesn't work for e.g. mkdir.
 
 I don't think we want to make this change, but I'll keep it in mind...
 
  >     The only change of behaviour this "fix" causes which might
  >     trouble some people, but which I find to be a feature for my own
  >     use [...]
 
 That would drive me crazy, FWIW. And probably not just me. So it's not
 exactly neutral.
 
 Also, to avoid massive confusion you'd have to change globbing so that
 "*/" behaves consistently, and that in turn will break a bunch of
 scripts that do things like "ls -d */ | ...".
 
 -- 
 David A. Holland
 dholland%netbsd.org@localhost
 


Home | Main Index | Thread Index | Old Index