From bee80c1a24d0de218228ebfaa2c8380229d5123d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 5 Jan 2018 04:31:44 -0500 Subject: [PATCH] ui/doom-dashboard: don't cd into non-existent directories Causes CDPATH errors. --- modules/ui/doom-dashboard/config.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/ui/doom-dashboard/config.el b/modules/ui/doom-dashboard/config.el index debcc73fc..5353d257e 100644 --- a/modules/ui/doom-dashboard/config.el +++ b/modules/ui/doom-dashboard/config.el @@ -124,8 +124,9 @@ whose dimensions may not be fully initialized by the time this is run." (defun +doom-dashboard-update-pwd () "TODO" (with-current-buffer (doom-fallback-buffer) - (cd (or (+doom-dashboard--get-pwd) - default-directory)))) + (let ((new-pwd (+doom-dashboard--get-pwd))) + (when (and new-pwd (file-directory-p new-pwd)) + (setq default-directory new-pwd))))) (defun +doom-dashboard-reload (&optional force) "Update the DOOM scratch buffer (or create it, if it doesn't exist)."