emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/consult 7a3ccdc: Fix permission denied error


From: ELPA Syncer
Subject: [elpa] externals/consult 7a3ccdc: Fix permission denied error
Date: Sat, 4 Sep 2021 06:57:07 -0400 (EDT)

branch: externals/consult
commit 7a3ccdc84d0255093317508b44c507155178c21c
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Fix permission denied error
    
    See https://github.com/minad/vertico/issues/118
---
 consult.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/consult.el b/consult.el
index 1fccd9b..a6602e8 100644
--- a/consult.el
+++ b/consult.el
@@ -1056,7 +1056,8 @@ MARKER is the cursor position."
       (if name
           (let ((default-directory dir))
             (or (get-file-buffer name)
-                (when-let* ((attrs (file-attributes name))
+                ;; file-attributes may throw permission denied error
+                (when-let* ((attrs (ignore-errors (file-attributes name)))
                             (size (file-attribute-size attrs)))
                   (if (> size consult-preview-max-size)
                       (prog1 nil



reply via email to

[Prev in Thread] Current Thread [Next in Thread]