1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-11-12 10:00:56 +01:00

34092: fix miscount of symlink resolution for "..".

This caused problems with expanding a path with ".." in "whence -S".
This commit is contained in:
Peter Stephenson 2015-01-04 19:42:45 +00:00
parent f9cba834cd
commit 98f465c09f
2 changed files with 5 additions and 0 deletions

View file

@ -741,6 +741,8 @@ xsymlinks(char *s, int full)
while (*--p != '/')
xbuflen--;
*p = '\0';
/* The \0 isn't included in the length */
xbuflen--;
continue;
}
sprintf(xbuf2, "%s/%s", xbuf, *pp);