summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2015-10-03 18:08:52 -0400
committerKyle Meyer <kyle@kyleam.com>2015-10-03 18:08:52 -0400
commit2c349cc65a36010cf17ce971f42a2829863359dd (patch)
tree5f28dbbb0f3eaf53cb558633f0d6ea06f012c279
parentee3d9363c513820d36da0b4997ede96470e23244 (diff)
downloadorg-mode-2c349cc65a36010cf17ce971f42a2829863359dd.tar.gz
ob-tangle: Check that publishing directory exists
* lisp/ob-tangle.el (org-babel-tangle-publish): Create publishing directory if it doesn't exist. Reported-by: Arun Isaac <theroarofthedragon@gmail.com> <http://permalink.gmane.org/gmane.emacs.orgmode/101697>
-rw-r--r--lisp/ob-tangle.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el
index 1c3051f..591da4c 100644
--- a/lisp/ob-tangle.el
+++ b/lisp/ob-tangle.el
@@ -185,6 +185,8 @@ Return a list whose CAR is the tangled file name."
(defun org-babel-tangle-publish (_ filename pub-dir)
"Tangle FILENAME and place the results in PUB-DIR."
+ (unless (file-exists-p pub-dir)
+ (make-directory pub-dir t))
(mapc (lambda (el) (copy-file el pub-dir t)) (org-babel-tangle-file filename)))
;;;###autoload