Subject: Re: mkdir with trailing / (patch proposed)
To: None <tech-userlevel@netbsd.org>
From: Wolfgang Rupprecht <wolfgang+gnus20020428T160900@wsrcc.com>
List: tech-userlevel
Date: 04/28/2002 16:10:54
> I'm scratching my head over this.
>
> On 1.5.3RC1 and a recent -current I can:
>
> mkdir -p //foo//bar//
>
> without a problem and create /foo/bar.
>
> Was the failure mode something different?
I think they are talking about mkdir(2) not mkdir(1).
main(){
int ret;
ret = mkdir("//tmp//bar//", 0777);
if (ret < 0){
perror("mkdir 1");
}
ret = mkdir("/tmp/bar2", 0777);
if (ret < 0){
perror("mkdir 2");
}
}
The first fails in -current with a "mkdir 1: No such file or
directory" and the second succeeds.
-wolfgang
--
Wolfgang Rupprecht <wolfgang+gnus@dailyplanet.wsrcc.com>
http://www.wsrcc.com/wolfgang/
Coming soon: GPS mapping tools for Open Systems. http://www.gnomad-mapping.com/