diff options
author | Frederick Muriuki Muriithi | 2024-11-18 17:00:23 -0600 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-11-18 17:00:23 -0600 |
commit | 24135fc9bcb01c896849532419e23badd6790eef (patch) | |
tree | c74302a72d5c939eb098f02b815125e2c651dacd /web/webserver.scm | |
parent | 7af301caa7d8a5f01e7e3be007e4ba53dc482eee (diff) | |
download | gn-guile-24135fc9bcb01c896849532419e23badd6790eef.tar.gz |
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.
Diffstat (limited to 'web/webserver.scm')
-rw-r--r-- | web/webserver.scm | 6 |
1 files 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") |