* bug fix: better error signalling when calls to functions seeking elements
from lists (eg. ADJOIN) are compiled with both :TEST and :TEST-NOT.
(reported by Tobias Rittweiler)
+ * bug fix: regression in DIRECTORY from 1.0.28.61, pattern matching of
+ directory components now works again.
changes in sbcl-1.0.29 relative to 1.0.28:
* IMPORTANT: bug database has moved from the BUGS file to Launchpad
symbolic link as an immediate child of DIRECTORY.
Experimental: interface subject to change."
+ (declare (pathname-designator directory))
(let* ((fun (%coerce-callable-to-fun function))
(physical (physicalize-pathname directory))
;; Not QUERY-FILE-SYSTEM :EXISTENCE, since it doesn't work on Windows
(if (eq :wild this)
#'cont
(lambda (sub)
- (awhen (pattern-matches this (last-directory-piece sub))
- (funcall #'cont it))))
+ (when (pattern-matches this (last-directory-piece sub))
+ (funcall #'cont sub))))
directory
:files nil
:directories t
(sb-ext:quit :unix-status $EXIT_LISP_WIN)
EOF
check_status_maybe_lose "DIRECTORY/TRUENAME part 3" $?
+cleanup_test_subdirectory
+
+# DIRECTORY pattern matching
+use_test_subdirectory
+
+mkdir foo
+touch foo/aa.txt
+touch foo/aa.tmp
+mkdir far
+touch far/ab.txt
+touch far/ab.tmp
+mkdir qar
+touch qar/ac.txt
+touch qar/ac.tmp
+run_sbcl <<EOF
+(defun test (pattern &rest expected)
+ (let ((wanted (sort (mapcar #'truename expected) #'string< :key #'namestring))
+ (got (sort (directory pattern) #'string< :key #'namestring)))
+ (unless (equal wanted got)
+ (format t "wanted:~% ~Sgot:~% ~S" wanted got)
+ (error "wanted:~% ~Sgot:~% ~S" wanted got))))
+(test "*/a*.txt" "foo/aa.txt" "far/ab.txt" "qar/ac.txt")
+(test "fo*/a*.t*" "foo/aa.txt" "foo/aa.tmp")
+(test "*/*b.*" "far/ab.txt" "far/ab.tmp")
+(test "*a*/*.txt" "far/ab.txt" "qar/ac.txt")
+(test "*ar/*.txt" "far/ab.txt" "qar/ac.txt")
+(quit :unix-status $EXIT_LISP_WIN)
+EOF
+check_status_maybe_lose "DIRECTORY/PATTERNS" $?
# Test whether ENSURE-DIRECTORIES-EXIST can create a directory whose
# name contains a wildcard character (it used to get itself confused
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.29.6"
+"1.0.29.7"