Skip to content
Snippets Groups Projects
Commit 1665d619 authored by wlott's avatar wlott
Browse files

Fixed %enumerate-files to skip ``.'' and ``..''. Fixed directory to merge

in :wild for the name, type, and version.
parent f1666b8a
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/filesys.lisp,v 1.20 1991/12/16 20:00:44 wlott Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/filesys.lisp,v 1.21 1991/12/18 11:42:09 wlott Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -557,19 +557,21 @@ ...@@ -557,19 +557,21 @@
(loop (loop
(let ((file (mach:read-dir dir))) (let ((file (mach:read-dir dir)))
(if file (if file
(multiple-value-bind (unless (or (string= file ".")
(file-name file-type file-version) (string= file ".."))
(let ((*ignore-wildcards* t)) (multiple-value-bind
(extract-name-type-and-version (file-name file-type file-version)
file 0 (length file))) (let ((*ignore-wildcards* t))
(when (and (components-match file-name name) (extract-name-type-and-version
(components-match file-type type) file 0 (length file)))
(components-match file-version (when (and (components-match file-name name)
version)) (components-match file-type type)
(funcall function (components-match file-version
(concatenate 'string version))
directory (funcall function
file)))) (concatenate 'string
directory
file)))))
(return)))) (return))))
(mach:close-dir dir))))) (mach:close-dir dir)))))
(t (t
...@@ -746,7 +748,10 @@ ...@@ -746,7 +748,10 @@
never includes Unix dot and dot-dot in the result." never includes Unix dot and dot-dot in the result."
(let ((results nil)) (let ((results nil))
(enumerate-search-list (enumerate-search-list
(pathname pathname) (pathname (merge-pathnames pathname
(make-pathname :name :wild
:type :wild
:version :wild)))
(enumerate-matches (name pathname) (enumerate-matches (name pathname)
(when (or all (when (or all
(let ((slash (position #\/ name :from-end t))) (let ((slash (position #\/ name :from-end t)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment