X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/0bfb53a23531bea3aaeadcd1a6f6c372eef96612..c4db59aa4b58bca9cd146ae30f507c16218a67d7:/uip/whatnowproc.c diff --git a/uip/whatnowproc.c b/uip/whatnowproc.c index 05dc8ff3..8fc6ee72 100644 --- a/uip/whatnowproc.c +++ b/uip/whatnowproc.c @@ -99,8 +99,11 @@ what_now (char *ed, int nedit, int use, char *file, char *altmsg, int dist, context_save (); /* save the context file */ fflush (stdout); - if (cwd) - chdir (cwd); + if (cwd) { + if (chdir (cwd) < 0) { + advise (cwd, "chdir"); + } + } /* * If the "whatnowproc" is the nmh command "whatnow",