branch: externals-release/org commit e275ab2701a965c8af9f7c160fd7cca69d9c7b3b Author: Ihor Radchenko <yanta...@posteo.net> Commit: Ihor Radchenko <yanta...@posteo.net>
org-persist: Fix edge case when we have no permission to read index file * lisp/org-persist.el (org-persist-read:index): Do not try reading index file we have no permission to read. Reported-by: Andreas Röhler <andreas.roeh...@easy-emacs.de> Link: https://orgmode.org/list/ee44aed6-8b50-4afd-bb90-47675ce84...@easy-emacs.de --- lisp/org-persist.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-persist.el b/lisp/org-persist.el index 342418c86e..73d42935ff 100644 --- a/lisp/org-persist.el +++ b/lisp/org-persist.el @@ -725,7 +725,7 @@ COLLECTION is the plist holding data collection." (defun org-persist-read:index (cont index-file _) "Read index container CONT from INDEX-FILE." - (when (file-exists-p index-file) + (when (and (file-exists-p index-file) (file-readable-p index-file)) (let ((index (org-persist--read-elisp-file index-file))) (when index (catch :found