0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-08-25 06:32:53 +00:00

org-persist-associated-files:file: Fix when container has been deleted

* lisp/org-persist.el (org-persist-associated-files:file): Do not err
when `org-persist-read' returns nil (failed to read).
This commit is contained in:
Ihor Radchenko 2023-02-14 23:07:28 +03:00
parent e6353d5b9c
commit 6b0c2775f0
No known key found for this signature in database
GPG key ID: 6470762A7DA11D8B

View file

@ -1162,7 +1162,7 @@ Do nothing in an indirect buffer."
(defun org-persist-associated-files:file (container collection)
"List file CONTAINER associated files of COLLECTION in `org-persist-directory'."
(let ((file (org-persist-read container (plist-get collection :associated))))
(when (file-exists-p file)
(when (and file (file-exists-p file))
(list file))))
(defun org-persist-associated-files:url (container collection)