Hi Guile Users!
In my explorations into making examples for web development, I came
across the question of how to get an absolute path from any given path.
This is useful for example when checking, whether a path points to
something inside a static assets directory, or perhaps sneakily tries to
escape that and access things it should not.
I found in Guile's manual the function (canonicalize-path path).
However, this function has one problem, which makes it not sufficient on
its own: It raises an exception, when a path given points to something
that does not exist. I would like to have a function, that gives me the
absolute path of any path I give as argument, not only for existing
paths. So i went ahead and wrote the following code
(https://notabug.org/ZelphirKaltstahl/guile-examples/src/14a76a6aee18a900ac9b9de2b79ede239f8cf9f0/file-system/path-handling.scm):