Commit b2b9020f authored by Francois-Rene Rideau's avatar Francois-Rene Rideau
Browse files

Fix file-pathname-p to accept NIL pathname-name

ccl, gcl, lispworks think that (probe-file #p".bashrc") has its
pathname-name and pathname-type be NIL and "bashrc" whereas other
implementations (at least abcl allegro clisp cmucl ecl mkcl sbcl xcl)
think that it has them be ".bashrc" and NIL.

cl -l $l -i "(let ((p (probe-file \".bashrc\"))) \
(format t \"FOO $l: ~S ~S~%\" (pathname-name p) (pathname-type p)))" \
|& grep FOO
parent 9451a887
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -268,9 +268,9 @@ actually-existing file.

Returns the (parsed) PATHNAME when true"
    (when pathname
      (let* ((pathname (pathname pathname))
             (name (pathname-name pathname)))
        (when (not (member name '(nil :unspecific "") :test 'equal))
      (let ((pathname (pathname pathname)))
        (unless (and (member (pathname-name pathname) '(nil :unspecific "") :test 'equal)
                     (member (pathname-type pathname) '(nil :unspecific "") :test 'equal))
          pathname)))))