branch: externals-release/org
commit de83f548d991779048f9c525806a7278026368d6
Author: Ihor Radchenko <[email protected]>
Commit: Ihor Radchenko <[email protected]>
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.
---
lisp/org-persist.el | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lisp/org-persist.el b/lisp/org-persist.el
index 60291e5187..0d4f425834 100644
--- a/lisp/org-persist.el
+++ b/lisp/org-persist.el
@@ -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)