diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2003-04-23 18:04:05 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2003-04-23 18:04:05 +0000 |
commit | 5b5c0175d5d4bb45c63f7fcf62c2f476fde1ee64 (patch) | |
tree | ba5c3869c09d1a1afa876405342925f8a0952688 /Src/init.c | |
parent | 29a3496ebb91cc418db4b5ba66837c59c8170df5 (diff) | |
download | zsh-5b5c0175d5d4bb45c63f7fcf62c2f476fde1ee64.tar.gz zsh-5b5c0175d5d4bb45c63f7fcf62c2f476fde1ee64.tar.xz zsh-5b5c0175d5d4bb45c63f7fcf62c2f476fde1ee64.zip |
IKEGAMI Tsutomu: sf bug 722366: metafy pwd when read from $PWD
Diffstat (limited to 'Src/init.c')
-rw-r--r-- | Src/init.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/init.c b/Src/init.c index 2118a5f5f..e3a6bda3a 100644 --- a/Src/init.c +++ b/Src/init.c @@ -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); |