diff options
Diffstat (limited to 'src/window.c')
-rw-r--r-- | src/window.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/window.c b/src/window.c index 2feb9e25b5..b360f54e11 100644 --- a/src/window.c +++ b/src/window.c @@ -4029,14 +4029,14 @@ win_enter_ext(wp, undo_sync, curwin_invalid) if (mch_dirname(cwd, MAXPATHL) == OK) globaldir = vim_strsave(cwd); } - mch_chdir((char *)curwin->w_localdir); - shorten_fnames(TRUE); + if (mch_chdir((char *)curwin->w_localdir) == 0) + shorten_fnames(TRUE); } else if (globaldir != NULL) { /* Window doesn't have a local directory and we are not in the global * directory: Change to the global directory. */ - mch_chdir((char *)globaldir); + ignored = mch_chdir((char *)globaldir); vim_free(globaldir); globaldir = NULL; shorten_fnames(TRUE); |