36c36
< * $Id: cd.c,v 1.10 1996/12/23 22:16:35 steve Exp $
---
> * $Id: cd.c,v 1.11 1996/12/23 22:29:03 steve Exp $
49d48
< #include <limits.h>
135c134,135
< if (chdir(dest) < 0) {
---
> updatepwd(dest);
> if (chdir(stackblock()) < 0) {
139c139,143
< updatepwd(dest);
---
> hashcd(); /* update command hash table */
> if (prevdir)
> ckfree(prevdir);
> prevdir = curdir;
> curdir = savestr(stackblock());
173,175c177,178
< * Update curdir (the name of the current directory) in response to a
< * cd command. We also call hashcd to let the routines in exec.c know
< * that the current directory has changed.
---
> * Determine the new working directory, but don't actually enforce
> * any changes.
184d186
< hashcd(); /* update command hash table */
209,214d210
< INTOFF;
< if (prevdir)
< ckfree(prevdir);
< prevdir = curdir;
< curdir = savestr(stackblock());
< INTON;
223c219
< if(!getpwd())
---
> if (!getpwd())
< * $Id: cd.c,v 1.10 1996/12/23 22:16:35 steve Exp $
---
> * $Id: cd.c,v 1.11 1996/12/23 22:29:03 steve Exp $
49d48
< #include <limits.h>
135c134,135
< if (chdir(dest) < 0) {
---
> updatepwd(dest);
> if (chdir(stackblock()) < 0) {
139c139,143
< updatepwd(dest);
---
> hashcd(); /* update command hash table */
> if (prevdir)
> ckfree(prevdir);
> prevdir = curdir;
> curdir = savestr(stackblock());
173,175c177,178
< * Update curdir (the name of the current directory) in response to a
< * cd command. We also call hashcd to let the routines in exec.c know
< * that the current directory has changed.
---
> * Determine the new working directory, but don't actually enforce
> * any changes.
184d186
< hashcd(); /* update command hash table */
209,214d210
< INTOFF;
< if (prevdir)
< ckfree(prevdir);
< prevdir = curdir;
< curdir = savestr(stackblock());
< INTON;
223c219
< if(!getpwd())
---
> if (!getpwd())