check for existance of org-directory before searching it

This commit is contained in:
Matt Huszagh 2020-08-24 15:39:04 -07:00
parent 6633dbb276
commit 5e715c6424

View file

@ -240,7 +240,8 @@ automatically from the query."
When RECURSE is non-nil, recurse into subdirectories. When
REGEXP is non-nil, only return files that match REGEXP."
(let ((files (->> directories
(--map (f-files it nil recurse))
(--map (if (f-exists-p it)
(f-files it nil recurse)))
-flatten)))
(if regexp
(--select (string-match regexp it)