diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2010-06-08 08:51:03 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2010-06-08 08:51:03 +0000 |
commit | 7850fc5a2cbdbcec1da405f4d3eba65abf3293f8 (patch) | |
tree | 56f39bd6ee2e714b6d27d96c9cbc7e8260c2b098 /Src/init.c | |
parent | 4c0f2dfe8fdae3b3faa883e4b276587c263ab460 (diff) | |
download | zsh-7850fc5a2cbdbcec1da405f4d3eba65abf3293f8.tar.gz zsh-7850fc5a2cbdbcec1da405f4d3eba65abf3293f8.tar.xz zsh-7850fc5a2cbdbcec1da405f4d3eba65abf3293f8.zip |
28006: make zgetcwd() fall back to pwd,
only use "." if setting pwd
Diffstat (limited to 'Src/init.c')
-rw-r--r-- | Src/init.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Src/init.c b/Src/init.c index dea9aff40..06f177725 100644 --- a/Src/init.c +++ b/Src/init.c @@ -861,8 +861,10 @@ setupvals(void) else if ((ptr = zgetenv("PWD")) && (strlen(ptr) < PATH_MAX) && (ptr = metafy(ptr, -1, META_STATIC), ispwd(ptr))) pwd = ztrdup(ptr); - else + else { + pwd = NULL; pwd = metafy(zgetcwd(), -1, META_DUP); + } oldpwd = ztrdup(pwd); /* initialize `OLDPWD' = `PWD' */ |