* mu4e: check if maildir is readable first (`mu4e~get-maildirs-1')
This commit is contained in:
@ -145,7 +145,8 @@ paths."
|
|||||||
;; first, we get a list of all directory paths under PATH that have a
|
;; first, we get a list of all directory paths under PATH that have a
|
||||||
;; directory 'cur' as leaf; then we we remove from that list all of those that
|
;; directory 'cur' as leaf; then we we remove from that list all of those that
|
||||||
;; don't have tmp, new sister dirs. And there we're done!
|
;; don't have tmp, new sister dirs. And there we're done!
|
||||||
;; 1. get all proper subdirs of the current dir
|
;; 1. get all proper subdirs of the current dir, if it is readable
|
||||||
|
(when (file-accessible-directory-p path)
|
||||||
(let* ((subdirs
|
(let* ((subdirs
|
||||||
(remove-if
|
(remove-if
|
||||||
(lambda (de)
|
(lambda (de)
|
||||||
@ -162,7 +163,7 @@ paths."
|
|||||||
(add-to-list 'maildirs (if mdir mdir "/") t)))
|
(add-to-list 'maildirs (if mdir mdir "/") t)))
|
||||||
(setq maildirs (append maildirs
|
(setq maildirs (append maildirs
|
||||||
(mu4e~get-maildirs-1 path (concat mdir "/" dir)))))
|
(mu4e~get-maildirs-1 path (concat mdir "/" dir)))))
|
||||||
maildirs))
|
maildirs)))
|
||||||
|
|
||||||
(defvar mu4e~maildir-list nil "Cached list of maildirs.")
|
(defvar mu4e~maildir-list nil "Cached list of maildirs.")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user