From 488afce7361fce7b2b0f7a16a7bace524b3b911e Mon Sep 17 00:00:00 2001 From: rtoy <rtoy> Date: Mon, 18 Oct 2004 16:57:33 +0000 Subject: [PATCH] EXTRACT-NAME-TYPE-AND-VERSION: o Was not treating "foo.lisp.*" as having a version :wild, like cmucl used to. Reinstate this. o Honor *ignore-wildcards* when extracting versions. This prevents errors if there's a file named like "foo.lisp.~*~". %ENUMERATE-FILES: o Was handling the case when the version is :wild. We now search the directory for versions that match. Issue reported by Lynn Quam, cmucl-imp, 2004-10-15. --- code/filesys.lisp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/code/filesys.lisp b/code/filesys.lisp index a78311e91..d2a2a26c6 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.83 2004/09/27 19:06:35 rtoy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/filesys.lisp,v 1.84 2004/10/18 16:57:33 rtoy Exp $") ;;; ;;; ********************************************************************** ;;; @@ -181,12 +181,14 @@ ;; namestring, where * can be #\* or some digits. This ;; denotes a version. (cond ((or (< (- end start) 4) - (char/= (schar namestr (1- end)) #\~)) + (and (char/= (schar namestr (1- end)) #\~) + (char/= (schar namestr (1- end)) #\*))) ;; No explicit version given, so return NIL to ;; indicate we don't want file versions, unless ;; requested in other ways. (values nil end)) - ((and (char= (schar namestr (- end 2)) #\*) + ((and (not *ignore-wildcards*) + (char= (schar namestr (- end 2)) #\*) (char= (schar namestr (- end 3)) #\~) (char= (schar namestr (- end 4)) #\.)) ;; Found "~*~", so it's a wild version @@ -214,7 +216,8 @@ (explicit-version namestr start end) (cond ((not (eq version :newest)) (values version where)) - ((and (>= (- end 2) start) + ((and (not *ignore-wildcards*) + (>= (- end 2) start) (char= (schar namestr (- end 1)) #\*) (char= (schar namestr (- end 2)) #\.) (find #\. namestr @@ -673,7 +676,8 @@ ((or (pattern-p name) (pattern-p type) (eq name :wild) - (eq type :wild)) + (eq type :wild) + (eq version :wild)) (let ((dir (unix:open-dir directory))) (when dir (unwind-protect -- GitLab