Confusing error mode of translate-logical-pathname

Bug #980023 reported by Faré
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
New
Undecided
Unassigned

Bug Description

(setf (logical-pathname-translations "FOO") `(("**;*.lisp.*" "/foo/**/*.lisp.*")))
(translate-logical-pathname "foo:bar;quux.lisp")

==>

#P"/foo/bar/QUUX.lisp.lisp"

It took me a while to figure out what was happening.
The *.lisp.* in logical pathname context is read as :name :wild :type "lisp" :version :wild,
but in unix pathname context is read as :name #<SB-IMPL::PATTERN :MULTI-CHAR-WILD ".lisp"> :type :wild :version :newest.
Then translate-pathname, instead of declaring these two patterns as a mismatch, happily translates away.

Maybe that's on purpose. If so, it's mighty confusing. Maybe a STYLE-WARNING when setting logical-pathname-translations is warranted?

Revision history for this message
Zach Beane (xach) wrote :

This has little to do with logical pathname translations and a lot to do with wildcard namestring syntax.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.