[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/projectile 9613016: Ignore errors listing directory files
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/projectile 9613016: Ignore errors listing directory files in the project search path |
Date: |
Sat, 13 Nov 2021 14:57:49 -0500 (EST) |
branch: elpa/projectile
commit 96130165ef4040426d34d877b9ee6dfd27f92fb9
Author: Chris Rose <chrisros@amazon.com>
Commit: Bozhidar Batsov <bozhidar@batsov.dev>
Ignore errors listing directory files in the project search path
If the search path is the root of a volume, it can have a spotlight
directory in it that emacs can't necessarily read. This avoids errors
like this:
```
Opening directory: Operation not permitted,
/home/offby1/workspace/.Spotlight-V100
```
---
projectile.el | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/projectile.el b/projectile.el
index b1aadac..750c9a6 100644
--- a/projectile.el
+++ b/projectile.el
@@ -1047,7 +1047,11 @@ If DEPTH is non-nil recursively descend exactly DEPTH
levels below DIRECTORY and
discover projects there."
(if (file-directory-p directory)
(if (and (numberp depth) (> depth 0))
- (dolist (dir (directory-files directory t))
+ ;; Ignore errors when listing files in the directory, because
+ ;; sometimes that directory is an unreadable one at the root of a
+ ;; volume. This is the case, for example, on macOS with the
+ ;; .Spotlight-V100 directory.
+ (dolist (dir (ignore-errors (directory-files directory t)))
(when (and (file-directory-p dir)
(not (member (file-name-nondirectory dir) '(".." "."))))
(projectile-discover-projects-in-directory dir (1- depth))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/projectile 9613016: Ignore errors listing directory files in the project search path,
ELPA Syncer <=