diff --git a/lisp/org-publish.el b/lisp/org-publish.el index 1518efe59..8e32658d0 100644 --- a/lisp/org-publish.el +++ b/lisp/org-publish.el @@ -984,7 +984,9 @@ the project." main last-main letter last-letter file sub link tgext) ;; `files' contains the list of relative file names (dolist (file files) - (setq origfile (substring file 1 -1)) + (setq origfile + (concat (file-name-directory file) + (substring (file-name-nondirectory file) 1 -1))) (setq buf (find-file-noselect file)) (with-current-buffer buf (goto-char (point-min))