OK, I /have/ misdiagnosed this. The logic seems actually busted in directory-pathname-p. The problem is that, at least on allegro, you can get a valid directory pathname whose name component is neither NIL, nor :unspecific, but "" (the empty string).
Ugh,
(member (pathname-name pathname) (list nil "" :unspecific) :test 'equal)
A source of the problem are pathnames that arise from things like this:
> (make-pathname :name "" :directory '(:absolute "tmp")) #p"/tmp/" > (pathname-name *) ""
Added a call to namestring seems to be another way to canonical things so I think this will also work and feels (to me) a bit more portable:
(defun directory-pathname-p (pathname) (let ((pathname (namestring pathname))) (and (member (pathname-name pathname) (list nil :unspecific)) (member (pathname-type pathname) (list nil :unspecific)))))
wadayathink? Should I push? -- Gary Warren King, metabang.com Cell: (413) 559 8738 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM * gwking on twitter