[Armedbear-ticket] [armedbear] #371: Problems with CL:WILD-PATHNAME-P

armedbear armedbear-devel at common-lisp.net
Wed Sep 24 05:50:23 UTC 2014


#371: Problems with CL:WILD-PATHNAME-P
-----------------------------+-----------------------
 Reporter:  mevenson         |      Owner:
     Type:  defect           |     Status:  new
 Priority:  major            |  Milestone:  1.4.0
Component:  interpreter      |    Version:  1.4.0-dev
 Keywords:  ansi-compliance  |
-----------------------------+-----------------------
 Pascal notes on armedbear-devel@ :

 {{{
 Why do we have?

    (wild-pathname-p  #P"*-blah") -> T
    (wild-pathname-p  #P"*-blah" :name) -> NIL

 This is inconsistent (and non-conforming).
 Actually wild-pathname-p returns NIL for all fields:

 (mapcar (lambda (field) (wild-pathname-p  #P"*-blah" field))
        (list :host :device :directory :name :type :version))'
 --> (NIL NIL NIL NIL NIL NIL)

 If that was true, then (wild-pathname-p #P"*-blah" nil) should return
 NIL, not true.


    If field-key is not supplied or nil, wild-pathname-p returns true if
    pathname has any wildcard components, nil if pathname has none. If
    field-key is non-nil, wild-pathname-p returns true if the indicated
    component of pathname is a wildcard, nil if the component is not a
    wildcard.

 So we should have:

   (defun wild-pathname-p (path &optional field-key)
     (if (null field-key)
         (some (lambda (field-key)
                 (wild-pathname-p path field-key))
               '(:host :device :directory :name :type :version))
         …))
 }}}

--
Ticket URL: <http://abcl.org/trac/ticket/371>
armedbear <http://abcl.org>
armedbear


More information about the armedbear-ticket mailing list