From 63b672d4eaec5e45c15e8c9c3a30ef5ff331b8ba Mon Sep 17 00:00:00 2001 From: ram <ram> Date: Tue, 3 Aug 1993 13:27:11 +0000 Subject: [PATCH] Changed ENUMERATE-MATCHES (hence all filesys code) to do translate-logical-pathname on logical pathnames. --- code/filesys.lisp | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/code/filesys.lisp b/code/filesys.lisp index 962a0e961..5c7bd4a56 100644 --- a/code/filesys.lisp +++ b/code/filesys.lisp @@ -6,7 +6,7 @@ ;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/filesys.lisp,v 1.31 1993/07/31 01:07:13 ram Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/filesys.lisp,v 1.32 1993/08/03 13:27:11 ram Exp $") ;;; ;;; ********************************************************************** ;;; @@ -504,22 +504,25 @@ ,result)))) (defun %enumerate-matches (pathname verify-existance function) - (when (pathname-type pathname) - (unless (pathname-name pathname) - (error "Cannot supply a type without a name:~% ~S" pathname))) - (when (and (integerp (pathname-version pathname)) - (member (pathname-type pathname) '(nil :unspecific))) - (error "Cannot supply a version without a type:~% ~S" pathname)) - (let ((directory (pathname-directory pathname))) - (if directory - (ecase (car directory) - (:absolute - (%enumerate-directories "/" (cdr directory) pathname - verify-existance function)) - (:relative - (%enumerate-directories "" (cdr directory) pathname - verify-existance function))) - (%enumerate-files "" pathname verify-existance function)))) + (let ((pathname (if (typep pathname 'logical-pathname) + (translate-logical-pathname pathname) + pathname))) + (when (pathname-type pathname) + (unless (pathname-name pathname) + (error "Cannot supply a type without a name:~% ~S" pathname))) + (when (and (integerp (pathname-version pathname)) + (member (pathname-type pathname) '(nil :unspecific))) + (error "Cannot supply a version without a type:~% ~S" pathname)) + (let ((directory (pathname-directory pathname))) + (if directory + (ecase (car directory) + (:absolute + (%enumerate-directories "/" (cdr directory) pathname + verify-existance function)) + (:relative + (%enumerate-directories "" (cdr directory) pathname + verify-existance function))) + (%enumerate-files "" pathname verify-existance function))))) (defun %enumerate-directories (head tail pathname verify-existance function) (if tail -- GitLab