summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Okay <okay@toyful.space>2021-05-15 13:11:13 -0500
committerColin Okay <okay@toyful.space>2021-05-15 13:11:13 -0500
commit029ee104eebf293779f3dc82a857290c52b8a082 (patch)
tree065c8d89e01134fdc8aeb269f5fd7c8a12528e78
parent95b4d94acf92c2c62c05af4e3ad984e02fa6c898 (diff)
reletivizing pathnames in pathname publication
-rw-r--r--flexo.lisp8
1 files changed, 6 insertions, 2 deletions
diff --git a/flexo.lisp b/flexo.lisp
index 12a5b8e..e3beb1e 100644
--- a/flexo.lisp
+++ b/flexo.lisp
@@ -402,13 +402,17 @@ artifact tables have changed."
(:documentation "Publish the given artifact in the given location."))
(defmethod publish ((artifact file-artifact) (location pathname))
- (let ((path (uiop:merge-pathnames* (artifact-url-path artifact) location)))
+ (let ((path (uiop:merge-pathnames*
+ (uiop:relativize-pathname-directory (artifact-url-path artifact))
+ location)))
(ensure-directories-exist path)
(uiop:copy-file (filepath artifact) path)))
(defmethod publish ((generated template-generated-text) (location pathname))
(let ((path
- (uiop:merge-pathnames* (artifact-url-path generated) location)))
+ (uiop:merge-pathnames*
+ (uiop:relativize-pathname-directory (artifact-url-path generated))
+ location)))
(ensure-directories-exist path)
(alexandria:write-string-into-file
(generated-text generated)