Explorar o código

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>
Kyle Meyer %!s(int64=9) %!d(string=hai) anos
pai
achega
2c349cc65a
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      lisp/ob-tangle.el

+ 2 - 0
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