1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-27 04:40:59 +01:00

IKEGAMI Tsutomu: sf bug 722366: metafy pwd when read from $PWD

This commit is contained in:
Peter Stephenson 2003-04-23 18:04:05 +00:00
parent 29a3496ebb
commit 5b5c0175d5
2 changed files with 7 additions and 1 deletions

View file

@ -780,7 +780,8 @@ setupvals(void)
* initialize `PWD' from `HOME' */
if (ispwd(home))
pwd = ztrdup(home);
else if ((ptr = zgetenv("PWD")) && ispwd(ptr))
else if ((ptr = zgetenv("PWD")) && (strlen(ptr) < PATH_MAX) &&
(ptr = metafy(ptr, -1, META_STATIC), ispwd(ptr)))
pwd = ztrdup(ptr);
else
pwd = metafy(zgetcwd(), -1, META_DUP);