Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh 5.0.5-dev-2
On Thu, 14 Aug 2014 09:34:42 +0100
Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
> On Thu, 14 Aug 2014 00:34:54 +0200
> Oliver Kiddle <okiddle@xxxxxxxxxxx> wrote:
> > The bug reported in 32431 and 32550 is still there.
> >
> > Can we perhaps just remove or comment out that one error message for a
> > release?
>
> zsh -fw
> cd /
> zsh: path expansion failed, using root directory
>
> We certainly need to do something. But if this is the only issue, can't
> it be straightforwardly fixed like this?
If someone can reassure me that the weird undocumented interaction with
xbuf bypassing parameter passing starts here --- i.e. we are resetting
xbuf here, then xsymlinks fiddles with it and this code looks at the
result --- then I can't see how this change can be wrong as far as it
goes. The question is, is there more to it?
> diff --git a/Src/utils.c b/Src/utils.c
> index 998e46a..75fadd5 100644
> --- a/Src/utils.c
> +++ b/Src/utils.c
> @@ -780,6 +780,8 @@ xsymlink(char *s)
> {
> if (*s != '/')
> return NULL;
> + if (!s[1])
> + return ztrdup("/");
> *xbuf = '\0';
> xsymlinks(s + 1);
> if (!*xbuf) {
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author