Directory and wild pathnames.

Mark Evenson evenson at panix.com
Mon Jul 24 07:31:26 UTC 2017



On 7/23/17 13:32, Mark Cox wrote:
> G'day all,
> 
> The following code signals an error in ABCL 1.5.0 on OS X 10.10.5.
> 
> [1] CL-USER(1): (directory (merge-pathnames (make-pathname :directory
> '(:relative :wild))
>                                             (user-homedir-pathname)))
> #<THREAD "interpreter" {590C3415}>: Debugger invoked on condition of type
> TYPE-ERROR
>   The value NIL is not of type (OR PATHNAME STRING FILE-STREAM
> SYSTEM:JAR-STREAM SYSTEM:URL-STREAM).

This is an a [bug in ABCL's implementation, needing fixing][451].

[451]: http://abcl.org/trac/ticket/451

As a workaround, you can use the (underdocumented) predicate
SYS::PATHNAME-DIRECTORY-P) like in the following kludge:

(loop :for p :in (directory (merge-pathnames "*" (user-homedir-pathname)))
   :when (sys::pathname-directory-p p)
   :collect p)



-- 
"A screaming comes across the sky.  It has happened before, but there
is nothing to compare to it now."



More information about the armedbear-devel mailing list