[Git][cmucl/cmucl][master] 2 commits: Fix #157: (directory "**/") only returns directories

Raymond Toy (@rtoy) gitlab at common-lisp.net
Thu Mar 9 14:46:56 UTC 2023



Raymond Toy pushed to branch master at cmucl / cmucl


Commits:
b3de9354 by Raymond Toy at 2023-03-09T14:46:48+00:00
Fix #157: (directory "**/") only returns directories

- - - - -
39e30fad by Raymond Toy at 2023-03-09T14:46:48+00:00
Merge branch 'issue-157-directory-no-magic-wildcarding' into 'master'

Fix #157: (directory "**/") only returns directories

Closes #157

See merge request cmucl/cmucl!127
- - - - -


2 changed files:

- src/code/filesys.lisp
- tests/pathname.lisp


Changes:

=====================================
src/code/filesys.lisp
=====================================
@@ -1122,11 +1122,7 @@ optionally keeping some of the most recent old versions."
     (let ((results nil))
       (enumerate-search-list
 	  (pathname (merge-pathnames pathname
-				     (make-pathname :name :wild
-						    :type :wild
-						    :version :wild
-						    :defaults *default-pathname-defaults*)
-				     :wild))
+				     *default-pathname-defaults*))
 	(enumerate-matches (name pathname nil :follow-links follow-links)
 	  (when (or all
 		    (let ((slash (position #\/ name :from-end t)))


=====================================
tests/pathname.lisp
=====================================
@@ -72,4 +72,14 @@
 			       :directory '(:absolute "system2" "module4")
 			       :name nil :type nil)
 		(parse-namestring "ASDFTEST:system2;module4;"))))
-  
+
+
+
+(define-test directory.dirs
+  (let ((files (directory "src/assembly/**/")))
+    ;; Verify that we only returned directories
+    (loop for f in files
+	  for name = (pathname-name f)
+	  and type = (pathname-type f)
+	  do
+	     (assert-true (and (null name) (null type)) f))))



View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/7a15c46492914989dc85c532c3517cc7fcea0510...39e30fadfb5e47980037bf6686e33e3c14099092

-- 
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/7a15c46492914989dc85c532c3517cc7fcea0510...39e30fadfb5e47980037bf6686e33e3c14099092
You're receiving this email because of your account on gitlab.common-lisp.net.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cmucl-cvs/attachments/20230309/62ab57b5/attachment-0001.html>


More information about the cmucl-cvs mailing list