branch: elpa/projectile commit 3de6bdc2ae6c5ce08bce3726cec936e4da5d9bad Author: Greg Pfeil <g...@technomadic.org> Commit: Bozhidar Batsov <bozhi...@batsov.dev>
Simplify bottom-up file checks --- projectile.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/projectile.el b/projectile.el index 4a4faa7651..7792e7a4c7 100644 --- a/projectile.el +++ b/projectile.el @@ -1206,10 +1206,9 @@ Return the first (bottommost) matched directory or nil if not found." (projectile-locate-dominating-file dir (lambda (directory) - (when (file-readable-p directory) - (let ((files (mapcar (lambda (file) (expand-file-name file directory)) - (or list projectile-project-root-files-bottom-up)))) - (cl-some (lambda (file) (and file (file-readable-p file))) files)))))) + (let ((files (mapcar (lambda (file) (expand-file-name file directory)) + (or list projectile-project-root-files-bottom-up)))) + (cl-some (lambda (file) (and file (file-exists-p file))) files))))) (defun projectile-root-top-down-recurring (dir &optional list) "Identify a project root in DIR by recurring top-down search for files in LIST.