branch: externals/consult commit 7a3ccdc84d0255093317508b44c507155178c21c Author: Daniel Mendler <m...@daniel-mendler.de> Commit: Daniel Mendler <m...@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