branch: master
commit e05b7fc5595c2589c08717930b42746a8e637279
Author: Steven Allen <[email protected]>
Commit: Steven Allen <[email protected]>
Actually search for desktop files recursively
* counsel.el (counsel-linux-apps-list-desktop-files): Use
~directory-files-recursivly~ instead of ~directory-files~ when searching
for
desktop files.
---
counsel.el | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/counsel.el b/counsel.el
index 423f02f..a5fe1b9 100644
--- a/counsel.el
+++ b/counsel.el
@@ -2733,10 +2733,11 @@ And insert it into the minibuffer. Useful during
(dolist (dir (reverse counsel-linux-apps-directories))
(when (file-exists-p dir)
(let ((dir (file-name-as-directory dir)))
- (dolist (file (directory-files dir nil ".*\\.desktop$"))
- (let ((id (subst-char-in-string ?/ ?- file))
- (file (concat dir file)))
- (puthash id file hash))))))
+ (dolist (file (directory-files-recursively dir ".*\\.desktop$"))
+ (puthash
+ (subst-char-in-string ?/ ?- (file-relative-name file dir))
+ file
+ hash)))))
(maphash (lambda (key value)
(push (cons key value) result))
hash)