From 2c349cc65a36010cf17ce971f42a2829863359dd Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sat, 3 Oct 2015 18:08:52 -0400 Subject: [PATCH] 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 --- lisp/ob-tangle.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el index 1c3051fc4..591da4c1c 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