Browse Source

ox-publish: Add missing `file-truename'

* lisp/ox-publish.el (org-publish--expand-file-name): Add missing
  `file-truename'.
Nicolas Goaziou 3 years ago
parent
commit
31cf5b2a9a
1 changed files with 5 additions and 3 deletions
  1. 5 3
      lisp/ox-publish.el

+ 5 - 3
lisp/ox-publish.el

@@ -407,9 +407,11 @@ definition."
 (defun org-publish--expand-file-name (file project)
   "Return full file name for FILE in PROJECT.
 When FILE is a relative file name, it is expanded according to
-project base directory."
-  (if (file-name-absolute-p file) file
-    (expand-file-name file (org-publish-property :base-directory project))))
+project base directory.  Always return the true name of the file,
+ignoring symlinks."
+  (file-truename
+   (if (file-name-absolute-p file) file
+     (expand-file-name file (org-publish-property :base-directory project)))))
 
 (defun org-publish-expand-projects (projects-alist)
   "Expand projects in PROJECTS-ALIST.