* mu4e: check if maildir is readable first (`mu4e~get-maildirs-1')

This commit is contained in:
djcb
2012-08-22 11:52:24 +03:00
parent 43fac91449
commit d93c0bb3e2

View File

@ -145,7 +145,8 @@ paths."
;; 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
;; 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
(remove-if
(lambda (de)
@ -162,7 +163,7 @@ paths."
(add-to-list 'maildirs (if mdir mdir "/") t)))
(setq maildirs (append maildirs
(mu4e~get-maildirs-1 path (concat mdir "/" dir)))))
maildirs))
maildirs)))
(defvar mu4e~maildir-list nil "Cached list of maildirs.")