From b72366c8bff2d71797562cb9fd2f94185fdcdf6f Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Mon, 15 Aug 2022 18:42:32 +0530 Subject: Strip leading directory from other files. * ennum.el (ennum-publish): Strip leading directory from other files. (ennum-publish-generic): Prepend other files directory to find the source file. --- ennum.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'ennum.el') diff --git a/ennum.el b/ennum.el index 57b76cd..d52b2df 100644 --- a/ennum.el +++ b/ennum.el @@ -361,7 +361,9 @@ result as a string." (seq-mapcat 'ennum-publish-link (ennum-post-links post))))) (defun ennum-publish-generic (other-files-directory file) - (let ((interned-file (ennum-intern file))) + (let ((interned-file (ennum-intern + (ennum--file-join other-files-directory + file)))) (ennum-exp (let ((output-file (pcase (file-name-extension file) @@ -728,7 +730,8 @@ as keys. Keys are compared using `equal'." (ennum--filter-map 'ennum-post-thumbnail posts)) ;; Publish other files (seq-map (apply-partially 'ennum-publish-generic other-files-directory) - (ennum-directory-files other-files-directory)))))) + (ennum-with-current-directory (ennum-setting :other-files-directory) + (ennum-directory-files))))))) ;; Replace old output directory (when (file-exists-p (ennum-setting :output-directory)) (ennum--set-file-modes-recursively (ennum-setting :output-directory) #o755 #o644 #o755) -- cgit v1.2.3