Sam Steingold writes:
>
> what is going on?
>
> * (directory "Six-*-dates")
> (#p"Six-FOO-dates" #p"Six-BAR-dates")
(pathname-name (pathname "Six-*-dates")) is a CMUCL pathname pattern
object. If you use the inspector, you'll see that its PIECES slot is
("Six-" :multi-char-wild "-dates")
> * (directory (make-pathname :name (lisp::make-pattern '("Six-*-dates"))))
> NIL
(lisp::pattern-pieces (lisp::make-pattern '("Six-*-dates")))
=> ("Six-*-dates")
You probably meant to say (lisp::make-pattern '("Six-" :multi-char-wild "-dates"))
If you're going to dig around in the internals, you should read the
comments in the code.
> * (directory (namestring (make-pathname :name (lisp::make-pattern
> '("Six-*-dates")))))
> (#p"Six-FOO-dates" #p"Six-BAR-dates")
You used CMUCL internals to make a pathname, got its namestring, then
ran that through the namestring parser again. I'm not surprised you
came up with weird results. namestring->pathname->namestring->pathname
should be lossless. When you construct a pathname that couldn't ever
come about by using a supported interface, you shouldn't expect to be
able to make the roundtrip through namestrings without information loss.