branch: master
commit 950545ba0e0bde6b4662aa769f60ac3c768ffeb2
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
counsel.el (counsel-linux-apps-list): Check if dir exists
Fixes #896
---
counsel.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/counsel.el b/counsel.el
index d7bc5bc..25f7dce 100644
--- a/counsel.el
+++ b/counsel.el
@@ -2707,7 +2707,8 @@ And insert it into the minibuffer. Useful during
(let ((files (apply 'append
(mapcar
(lambda (dir)
- (directory-files dir t ".*\\.desktop$"))
+ (when (file-exists-p dir)
+ (directory-files dir t ".*\\.desktop$")))
counsel-linux-apps-directories))))
(dolist (file (cl-set-difference files (append (mapcar 'car
counsel-linux-apps-alist)
counsel-linux-apps-faulty)