Parcourir la source

babel: Use file-name-as-directory to form default-directory

Dan Davison il y a 15 ans
Parent
commit
486bc2fe64
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      contrib/babel/lisp/org-babel.el

+ 1 - 1
contrib/babel/lisp/org-babel.el

@@ -216,7 +216,7 @@ block."
          (cmd (intern (concat "org-babel-execute:" lang)))
 	 (dir (cdr (assoc :dir params)))
 	 (default-directory
-	   (or (and dir (if (string-match "/$" dir) dir (concat dir "/"))) default-directory))
+	   (or (and dir (file-name-as-directory dir)) default-directory))
 	 (call-process-region-original
 	  (if (boundp 'call-process-region-original) call-process-region-original
 	    (symbol-function 'call-process-region)))