forked from mirrors/org-mode
org-persist-gc: GC collections without persist file
* lisp/org-persist.el (org-persist-gc): Do not store collections that lack persist file. Such collection may emerge, for example, when writing fails or gets blocked for some reason (in `org-persist-before-write-hook' or when associated with encrypted file). Reported-by: Gustavo Barros <gusbrs.2016@gmail.com> Link: https://orgmode.org/list/CAM9ALR_F4gjWxOVh_Eq14NOC9nF6g0Cv1jAKb=p4FjPvjqSkWQ@mail.gmail.com
This commit is contained in:
parent
5ec364a1ae
commit
e11073d17d
|
@ -1210,7 +1210,8 @@ Also, remove containers associated with non-existing files."
|
|||
(setq expired? t)))
|
||||
(if expired?
|
||||
(org-persist--gc-persist-file persist-file)
|
||||
(push collection new-index)
|
||||
(when (file-exists-p persist-file)
|
||||
(push collection new-index))
|
||||
(dolist (container (plist-get collection :container))
|
||||
(dolist (associated-file
|
||||
(org-persist-associated-files:generic
|
||||
|
|
Loading…
Reference in New Issue