[Top][All Lists]

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

Re: AS_MKDIR_P bug/patch

From: Eric Sunshine
Subject: Re: AS_MKDIR_P bug/patch
Date: Fri, 26 Sep 2003 05:20:56 -0400

On 26 Sep 2003 01:29:54 -0700, Paul Eggert wrote:
> Eric Sunshine <address@hidden> writes:
> > The existing implementation leaves a bogus directory named
> > "-p" sitting in the working directory.
> I installed this.
> [if mkdir -p . 2>/dev/null; then
> as_mkdir_p=:
> else
> +  rm -fr ./-p
> as_mkdir_p=false
> fi

This works.  Note that it works because `mkdir' complains that `.' already  
exists, thus the `else' clause is invoked; as opposed to working on account  
of  `mkdir' complaining about `-p' (it does not complain).  Placing the `rm'  
outside the conditional seemed (to me) safer overall, but your approach works  
correctly for this case.

> > 2) _AS_MKDIR_P_PREPARE neglects to take advantage of the older `mkdirs'  
> > command
> The existing code runs correctly on these ancient hosts, doesn't it?
> If so, I wouldn't bother with this part of the patch.  We don't need
> to optimize for ancient hosts.

Yes, the existing code runs correctly.  Indeed, `mkdirs' was an optimization.

Thank you for installing the patch.

-- ES

reply via email to

[Prev in Thread] Current Thread [Next in Thread]