Skip to content

Commit 8f5d454

Browse files
committed
Fixed when directory doesn't exists.
1 parent 9026fd1 commit 8f5d454

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dashboard-ls.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Use this variable when you don't have the `default-directory' up to date.")
5252
(let* ((current-dir (if dashboard-ls-path
5353
dashboard-ls-path
5454
default-directory))
55-
(dir-lst (f-directories current-dir))
55+
(dir-lst (when (f-dir-p current-dir) (f-directories current-dir)))
5656
(opt-dir-lst '()))
5757
(dolist (dir dir-lst)
5858
(setq dir (s-replace current-dir "./" dir))
@@ -71,7 +71,7 @@ Use this variable when you don't have the `default-directory' up to date.")
7171
(let* ((current-dir (if dashboard-ls-path
7272
dashboard-ls-path
7373
default-directory))
74-
(file-lst (f-files current-dir))
74+
(file-lst (when (f-dir-p current-dir) (f-files current-dir)))
7575
(opt-file-lst '()))
7676
(dolist (file file-lst)
7777
(setq file (s-replace current-dir "./" file))

0 commit comments

Comments
 (0)