[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/projectile 3de6bdc2ae 3/3: Simplify bottom-up file checks
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/projectile 3de6bdc2ae 3/3: Simplify bottom-up file checks |
Date: |
Sat, 5 Nov 2022 12:59:12 -0400 (EDT) |
branch: elpa/projectile
commit 3de6bdc2ae6c5ce08bce3726cec936e4da5d9bad
Author: Greg Pfeil <greg@technomadic.org>
Commit: Bozhidar Batsov <bozhidar@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.