[Ecls-list] PATHNAME-MATCH-P mishandling terminating wild char?

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Thu Sep 7 12:49:14 UTC 2006


2006/9/7, Goffioul Michael <goffioul at imec.be>:
> Is it normal that:
> (pathname-match-p "ecl.dll" "ecl*")
> returns NIL?

Othe one hand, "ecl*" means file name "ecl*" and file type NIL; on the
other hand "ecl*.*" means file name "ecl*" and file type :WILD That is
the reason why "ECL*" cannot match "ECL.DLL": the first one does not
have a file type.

Other implementations behave similarly with respect to the pathname
components, but to my opinion they act inconsistently with
pathname-match-p, as it does not allow you to separate files with and
without type.

jlr at mpq3p59:~$ sbcl
* (pathname-name "ecl*")
#<SB-IMPL::PATTERN "ecl" :MULTI-CHAR-WILD>
* (pathname-type "ecl*.*")
:WILD
* (pathname-type "ecl*")
NIL
* (pathname-match-p (make-pathname :name "ecl" :type nil) "ecl*")
T
* (pathname-match-p (make-pathname :name "ecl" :type "dll") "ecl*")
T




More information about the ecl-devel mailing list