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

org-persist-write:file: Do not overwrite existing cached file

* lisp/org-persist.el (org-persist-write:file): Do not try to copy on
top of the cached file, when already exists.
This commit is contained in:
Ihor Radchenko 2022-12-26 20:04:16 +03:00
parent 8aea340d59
commit de83f548d9
No known key found for this signature in database
GPG key ID: 6470762A7DA11D8B

View file

@ -650,9 +650,10 @@ COLLECTION is the plist holding data collection."
(file-copy (org-file-name-concat
org-persist-directory
(format "%s-%s.%s" persist-file (md5 path) ext))))
(unless (file-exists-p (file-name-directory file-copy))
(make-directory (file-name-directory file-copy) t))
(copy-file path file-copy 'overwrite)
(unless (file-exists-p file-copy)
(unless (file-exists-p (file-name-directory file-copy))
(make-directory (file-name-directory file-copy) t))
(copy-file path file-copy 'overwrite))
(format "%s-%s.%s" persist-file (md5 path) ext)))))
(defun org-persist-write:url (c collection)