Opened 10 years ago

Last modified 10 months ago

#371 new defect

Problems with CL:WILD-PATHNAME-P

Reported by: Mark Evenson Owned by:
Priority: major Milestone: 1.9.3
Component: interpreter Version: 1.4.0-dev
Keywords: ansi-compliance Cc:
Parent Tickets:

Description

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))
        …))

Change History (14)

comment:1 Changed 10 years ago by Mark Evenson

The implementation of WILD-PATHNAME-P turns out to be in Java at <http://abcl.org/trac/browser/trunk/abcl/src/org/armedbear/lisp/Pathname.java#L1889>

comment:2 Changed 8 years ago by Mark Evenson

Milestone: 1.4.01.5.0

Ticket retargeted after milestone closed

comment:3 Changed 7 years ago by Mark Evenson

Milestone: 1.5.01.6.0

Ticket retargeted after milestone closed

comment:4 Changed 4 years ago by Mark Evenson

Milestone: 1.6.01.6.1

Ticket retargeted after milestone closed

comment:5 Changed 4 years ago by Mark Evenson

Milestone: 1.6.11.6.2

Ticket retargeted after milestone closed

comment:6 Changed 4 years ago by Mark Evenson

Milestone: 1.6.21.7.0

comment:7 Changed 4 years ago by Mark Evenson

Milestone: 1.7.01.7.1

Ticket retargeted after milestone closed

comment:8 Changed 4 years ago by Mark Evenson

Milestone: 1.7.11.7.2

Ticket retargeted after milestone closed

comment:9 Changed 4 years ago by Mark Evenson

Milestone: 1.7.21.8.0

Milestone renamed

comment:10 Changed 3 years ago by Mark Evenson

Milestone: 1.8.01.8.1

Ticket retargeted after milestone closed

comment:11 Changed 2 years ago by Mark Evenson

Milestone: 1.8.11.9.0

comment:12 Changed 15 months ago by Mark Evenson

Milestone: 1.9.01.9.1

comment:13 Changed 14 months ago by Mark Evenson

Milestone: 1.9.11.9.2

comment:14 Changed 10 months ago by Mark Evenson

Milestone: 1.9.21.9.3
Note: See TracTickets for help on using tickets.