From 24135fc9bcb01c896849532419e23badd6790eef Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 18 Nov 2024 17:00:23 -0600 Subject: Make paths ambivalent of working directory. Before this commit, the paths depended on the working directory, meaning if you launched the service in the "wrong" working directory, then it could not find the appropriate files. This commit makes the service ambivalent of what the working directory was when it was launched. --- web/webserver.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/webserver.scm b/web/webserver.scm index 6f40614..4969f23 100644 --- a/web/webserver.scm +++ b/web/webserver.scm @@ -224,11 +224,11 @@ otherwise search for set/group data" (('GET "version") (render-json get-version)) (('GET "css" fn) - (render-static-file (string-append "css/" fn))) + (render-static-file (string-append (dirname (current-filename)) "/css/" fn))) (('GET "map" fn) - (render-static-file (string-append "css/" fn))) + (render-static-file (string-append (dirname (current-filename)) "/css/" fn))) (('GET "static" "images" fn) - (render-static-image (string-append "static/images/" fn))) + (render-static-image (string-append (dirname (current-filename)) "/static/images/" fn))) (('GET "home" path) (render-brand path)) ; branding route for /home/aging, /home/msk etc (('GET "doc" "species.html") -- cgit v1.2.3