aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2022-08-15 18:42:32 +0530
committerArun Isaac2022-08-15 18:42:32 +0530
commitb72366c8bff2d71797562cb9fd2f94185fdcdf6f (patch)
tree1d8d56848ed8ed90e0f02c4be189394067e75e39
parent1a3dd7e67a36e3fa595a259eaacaf4805b415b26 (diff)
downloadennum-b72366c8bff2d71797562cb9fd2f94185fdcdf6f.tar.gz
ennum-b72366c8bff2d71797562cb9fd2f94185fdcdf6f.tar.lz
ennum-b72366c8bff2d71797562cb9fd2f94185fdcdf6f.zip
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.
-rw-r--r--ennum.el7
1 files changed, 5 insertions, 2 deletions
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)