From 1fe4bc598a23bdd751ccb3aa8e2473e783c634f7 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Sat, 11 Jun 2011 15:37:32 +0300 Subject: [PATCH] robustify DIRECTORY on logical pathnames PATHNAME-INTERSECTIONS used to return pathnames with name or type NIL if there was a mismatch -- but it should not return any pathnames at all for a mismatch. --- NEWS | 1 + src/code/filesys.lisp | 2 +- tests/filesys.test.sh | 12 ++++++++++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index e10971e..091a08b 100644 --- a/NEWS +++ b/NEWS @@ -19,6 +19,7 @@ changes relative to sbcl-1.0.49: boa-construtors can be used to initialized structure slots. * bug fix: FMAKUNBOUND removes the MACRO-FUNCTION, should one exist. (lp#795705, regression) + * bug fix: DIRECTORY works better on logical pathnames. changes in sbcl-1.0.49 relative to sbcl-1.0.48: * minor incompatible change: WITH-LOCKED-HASH-TABLE no longer disables diff --git a/src/code/filesys.lisp b/src/code/filesys.lisp index d1933d6..c8a3999 100644 --- a/src/code/filesys.lisp +++ b/src/code/filesys.lisp @@ -991,7 +991,7 @@ Experimental: interface subject to change." ((or (null one) (eq one :unspecific)) two) ((or (null two) (eq two :unspecific)) one) ((string= one two) one) - (t nil))) + (t (return-from pathname-intersections nil)))) (intersect-directory (one two) (aver (typep one '(or null (member :wild :unspecific) list))) (aver (typep two '(or null (member :wild :unspecific) list))) diff --git a/tests/filesys.test.sh b/tests/filesys.test.sh index c91324f..77aff65 100644 --- a/tests/filesys.test.sh +++ b/tests/filesys.test.sh @@ -219,12 +219,15 @@ touch qar/ac.tmp mkdir foo.moose touch foo.bar run_sbcl <