diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-09-29 23:24:04 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-09-29 23:24:04 +0000 |
commit | 25497a3818eadf0ff09a444ec268908263b74892 (patch) | |
tree | 7843a9e889293482008fc28ecd3280799f304d05 /Src/builtin.c | |
parent | 8ae9f297d20e9dfefd60c27671626af22ef474e1 (diff) | |
download | zsh-25497a3818eadf0ff09a444ec268908263b74892.tar.gz zsh-25497a3818eadf0ff09a444ec268908263b74892.tar.xz zsh-25497a3818eadf0ff09a444ec268908263b74892.zip |
revert-8084
Diffstat (limited to 'Src/builtin.c')
-rw-r--r-- | Src/builtin.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/Src/builtin.c b/Src/builtin.c index e159c1e85..ae608cc39 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -572,28 +572,8 @@ bin_pwd(char *name, char **argv, char *ops, int func) if (ops['r'] || ops['P'] || (isset(CHASELINKS) && !ops['L'])) printf("%s\n", zgetcwd()); else { - struct stat stdot, stpwd; - char *tmppwd; - /* - * We could print nothing and return status 1 if we can't - * stat ., but that's incompatible with both ksh and what - * we used to do. - */ - if (stat(".", &stdot) < 0 || - stat(pwd, &stpwd) >= 0 && stpwd.st_ino == stdot.st_ino) { - zputs(pwd, stdout); - putchar('\n'); - } else { - /* - * The directory has changed without us noticing it. We - * need to change pwd, since directory changing commands - * are liable to fail otherwise. - */ - zsfree(pwd); - printf("%s\n", tmppwd = zgetcwd()); - pwd = metafy(tmppwd, -1, META_DUP); - set_pwd_env(); - } + zputs(pwd, stdout); + putchar('\n'); } return 0; } |