From 6d47b84c7a5ee019109117fbf50d583eebfc801c Mon Sep 17 00:00:00 2001 From: "Robert P. Goldman" <rpgoldman@gmail.com> Date: Mon, 10 Feb 2014 10:50:41 -0600 Subject: [PATCH] More work on DIRECTORY-FILES. Use clisp-specific function in DIRECTORY-EXISTS-P implementation. Use lower-cost DIRECTORY-PATHNAME-P instead of DIRECTORY-EXISTS-P in DIRECTORY-FILES. --- uiop/filesystem.lisp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/uiop/filesystem.lisp b/uiop/filesystem.lisp index cf07757b..76be1bb0 100644 --- a/uiop/filesystem.lisp +++ b/uiop/filesystem.lisp @@ -144,7 +144,11 @@ or the original (parsed) pathname if it is false (the default)." "Is X the name of a directory that exists on the filesystem?" #+allegro (excl:probe-directory x) - #-allegro + #+clisp + (handler-case (ext:probe-directory x) + (sys::simple-file-error () + nil)) + #-(or allegro clisp) (let ((p (probe-file* x :truename t))) (and (directory-pathname-p p) p))) @@ -211,7 +215,7 @@ permits this." #+clisp (when (equal :wild (pathname-type pattern)) (ignore-errors (directory* (make-pathname :type nil :defaults pat))))))) - (remove-if 'directory-exists-p + (remove-if 'directory-pathname-p (filter-logical-directory-results directory entries #'(lambda (f) -- GitLab