One of my programs kinda relies on make-pathname returning "canonical"
paths. I noticed that, on Chicken 2.3,
(make-pathname "" "foo")
returns "/foo" instead of "foo", which was what I was expecting. I
wasn't expecting (cut make-pathname "" <>) to return an absolute path.
That has forced me to add that check and write
(make-pathname (and (not (string=? dir "")) dir) file)
instead of (make-pathname dir file). Similarly,
(make-pathname '("foo" "" "bar") "yes")
returns "foo//bar/yes" (notice the consecutive slashes). Attached is
an untested patch (against 2.3) that changes this behaviour, only
appending a slash when it is really needed.