On 6/10/06, Alejandro Forero Cuervo <[EMAIL PROTECTED]> wrote:
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.
I think this bug has already been fixed in the current development
version (IIRC by Kon, but I forgot).
(felix)
_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users