Opened 2 years ago

Last modified 2 years ago

#451 new defect

DIRECTORY errors with wildcard directory

Reported by: Evenson Not Org Owned by:
Priority: minor Milestone: 1.6.0
Component: interpreter Version:
Keywords: pathname Cc:
Parent Tickets:

Description

In <https://mailman.common-lisp.net/pipermail/armedbear-devel/2017-July/003870.html>, Mark Cox notes that

(directory (merge-pathnames (make-pathname :directory
                                           '(:relative :wild))
                            (user-homedir-pathname)))

errors with

The value NIL is not of type (OR PATHNAME
                                 STRING
                                 FILE-STREAM
                                 SYSTEM:JAR-STREAM
                                 SYSTEM:URL-STREAM).
   [Condition of type TYPE-ERROR]

Restarts:
 0: [RETRY] Retry SLIME REPL evaluation request.
 1: [*ABORT] Return to SLIME's top level.
 2: [ABORT] Abort thread.

Backtrace:
  0: (INVOKE-DEBUGGER #<TYPE-ERROR {7EA9D89E}>)
  1: org.armedbear.lisp.Lisp.error(Lisp.java:382)
  2: org.armedbear.lisp.Lisp.type_error(Lisp.java:435)
  3: (PATHNAME NIL)
  4: (PATHNAME-MATCH-P "adbkey" NIL)
  5: (DIRECTORY #P"/Users/evenson/*/")

Subtickets

Change History (1)

comment:1 Changed 2 years ago by Evenson Not Org

Workaround

(loop :for p :in (directory (merge-pathnames "*" (user-homedir-pathname)))
   :when (sys::pathname-directory-p p)
   :collect p)
Note: See TracTickets for help on using tickets.