Subject: bugs and/or misfeatures in namei changes
To: None <current-users@NetBSD.ORG>
From: John F. Woods <jfw@jfwhome.funhouse.com>
List: current-users
Date: 05/10/1997 11:25:26
I'm currently running Jason Thorpe's DMA test kernel, whose source
date I don't know (but I assume is probably fairly recent).  However,
on the off chance that this pathname bug (or is it a "feature"?) is
still present:

For an archive that I maintain, I have been in the habit of testing
for a directory that might or might not exist with

	cp file /archive/path/directory/

the idea being that if "/archive/path/directory" exists as a directory,
I want to copy "file" into it, otherwise it should fail.
Unfortunately, it now succeeds, copying "file" to
"/archive/path/directory" (as a regular file).

Now, this might qualify as an abuse of the previous behavior, and I
don't have a handy System V system to try it out with to determine if
System V handles it the way I want it to, but it would sure be nice if
it worked.  (yes, I know the workaround:  "cp file /archive/path/directory/.")
I'm moderately sure I didn't start using this trick recently
(i.e. since I started using NetBSD), but I am unsure that I ever tried
it on a genuine System V system.  (And V7 is too long ago to remember
if I used this trick then...)