about summary refs log tree commit diff
path: root/ennum.el
diff options
context:
space:
mode:
Diffstat (limited to 'ennum.el')
-rw-r--r--ennum.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/ennum.el b/ennum.el
index 6314a5c..12e04ce 100644
--- a/ennum.el
+++ b/ennum.el
@@ -501,9 +501,11 @@ result as a string."
                  (expand-file-name
                   (file-name-nondirectory interned-org-file)
                   (ennum-setting :static-directory))))
-           (ennum-copy interned-org-file post-file-copy)
-           (org-babel-tangle-file post-file-copy)
-           (delete-file post-file-copy)))))
+           (unwind-protect
+               (progn
+                 (ennum-copy interned-org-file post-file-copy)
+                 (org-babel-tangle-file post-file-copy))
+             (delete-file post-file-copy))))))
      (seq-mapcat 'ennum-publish-link (ennum-post-links post)))))
 
 (defun ennum-publish-generic (other-files-directory file)