Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#606 closed defect (fixed)

make-pathname always uses / separator char

Reported by: Jim Ursetto Owned by: felix winkelmann
Priority: major Milestone: 4.9.0
Component: core libraries Version: 4.7.x
Keywords: Cc:
Estimated difficulty:


Documentation says it uses the platform specific separator but it does not. You need a second (maybe expensive) pass through normalize-pathname. Is the documentation right or wrong? If wrong, what is the point of make-pathname?

Note: at least on mingw it still works to access a file with mixed or redundant pathname separators, so it may be ugly but the practical impact is unknown.

;; bad
(make-pathname "foo" "bar")
 ; => "foo/bar"
(make-pathname "foo\\" "bar")
 ; => "foo\\/bar"

;; good
(normalize-pathname (make-pathname "foo" "bar")
 ; => "foo\\bar"
(normalize-pathname (make-pathname "foo\\" "bar")
 ; => "foo\\bar"

Change History (2)

comment:1 Changed 13 years ago by felix winkelmann

Resolution: fixed
Status: newclosed

I updated the manual entry and changed the code to allow both "/" and "\" as separators. It keeps the separators given in the arguments but inserts "/" where it has to.
(See experimental branch)

comment:2 Changed 12 years ago by felix winkelmann


Milestone 4.8.0 deleted

Note: See TracTickets for help on using tickets.