diff --git a/mu4e/mu4e-utils.el b/mu4e/mu4e-utils.el index de7fee1d..f429ce25 100644 --- a/mu4e/mu4e-utils.el +++ b/mu4e/mu4e-utils.el @@ -244,7 +244,6 @@ Function will return the cdr of the list element." (cdr chosen) (mu4e-warn "Unknown shortcut '%c'" response)))) - (defun mu4e~get-maildirs-1 (path mdir) "Get maildirs under path, recursively, as a list of relative paths." (let ((dirs) @@ -257,8 +256,11 @@ Function will return the cdr of the list element." (when (and (booleanp (cadr dentry)) (cadr dentry)) (if (file-accessible-directory-p (concat mu4e-maildir "/" mdir "/" (car dentry) "/cur")) - (setq dirs (cons (concat mdir (car dentry)) dirs)) - (setq dirs (append dirs (mu4e~get-maildirs-1 path + (setq dirs (cons (concat mdir (car dentry)) dirs))) + (if (not (or (string-equal "cur" (car dentry)) + (string-equal "new" (car dentry)) + (string-equal "tmp" (car dentry)))) + (setq dirs (append dirs (mu4e~get-maildirs-1 path (concat mdir (car dentry) "/"))))))) dirs))