diff options
| author | Bozhidar Batsov <bozhidar@batsov.dev> | 2026-02-13 13:35:13 +0200 |
|---|---|---|
| committer | Bozhidar Batsov <bozhidar@batsov.dev> | 2026-02-13 13:35:13 +0200 |
| commit | 5560f083b69d40eb1a0e359fdd4ba9712f8a1bd8 (patch) | |
| tree | a01d10fe4fec5c2034478549fbeea41a8d05dd6d /projectile.el | |
| parent | ac37c2c96b1296b147aed021273efdd20e3b4938 (diff) | |
Skip unreadable directories in projectile-index-directory (#1873)
Wrap the directory-files call in ignore-errors so that unreadable
directories (e.g. .Spotlight-V100 on macOS) are silently skipped
instead of aborting the entire native indexing operation.
Diffstat (limited to 'projectile.el')
| -rw-r--r-- | projectile.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/projectile.el b/projectile.el index 90e2d48..0acc7f4 100644 --- a/projectile.el +++ b/projectile.el @@ -1524,7 +1524,10 @@ IGNORED-DIRECTORIES may optionally be provided." (projectile-index-directory f patterns progress-reporter ignored-files ignored-directories globally-ignored-directories)) (unless (projectile-ignored-file-p f ignored-files) (list f)))))) - (directory-files directory t))))) + ;; Use ignore-errors to skip unreadable directories (e.g. + ;; .Spotlight-V100 on macOS) instead of aborting the entire + ;; indexing operation. + (ignore-errors (directory-files directory t)))))) ;;; Alien Project Indexing ;; |
