Summary
make-pathname always uses / separator char
Metadata
- Id: dee48fb023dd5683e8571bca5b576dcf8979f40a
- Trac id: 606
- Type: defect
- Reporter: zbigniew
- Owner: felix
- Cc:
- Status: closed
- Component: core libraries
- Estimated difficulty:
- Resolution: fixed
- Priority: major
- Milestone: 4.9.0
- Version: 4.7.x
- Changetime: 2012-09-24 21:47:48 UTC
- Created: 2011-06-15 07:31:05 UTC
- Keywords:
Description
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"
Changes and comments
[2011-06-18 13:08:31 UTC] felix changed status from new to closed
[2011-06-18 13:08:31 UTC] felix set resolution to fixed
[2011-06-18 13:08:31 UTC] felix wrote:
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)
[2012-09-24 21:47:48 UTC] felix changed milestone from 4.8.0 to 4.9.0
[2012-09-24 21:47:48 UTC] felix wrote:
Milestone 4.8.0 deleted