Subject: Re: mkdir with trailing / (patch proposed)
To: enami tsugutomo <email@example.com>
From: Bill Studenmund <firstname.lastname@example.org>
Date: 04/29/2002 14:28:53
On Tue, 30 Apr 2002, enami tsugutomo wrote:
> There is my version in PR15397.
Your patch in 15397 seems to include a bit more than just fixing this bug;
you seem to be doing some explicit trailing '0' which should be factored
out. We should probably just do the trailing '0' changes. :-)
We picked a different name (NOREQDIR vs CREATEDIR), and a different bit.
I think the lower bit is slightly better as it's grouped with the other
things (LOCKPARENT), etc. that get set on the way in, not the bits that we
set internally (the lower bit is in MODMASK, which is commented as /* mask
of operational modifiers */).
The one major difference is that your patch doesn't check to see if we're
at the last component name. Consider mkdir("/tmp/foo/bar/") when /tmp
exists and /tmp/foo does not; we still want to have the system call error