[armedbear-cvs] r12667 - trunk/abcl/src/org/armedbear/lisp

Mark Evenson mevenson at common-lisp.net
Tue May 11 14:45:53 UTC 2010


Author: mevenson
Date: Tue May 11 10:45:53 2010
New Revision: 12667

Log:
Fix WILD-PATHNAME-P to check for pathname components which are strings containing "*".

Not working for pathnames whose HOST or DEVICE containing "*".



Modified:
   trunk/abcl/src/org/armedbear/lisp/Pathname.java

Modified: trunk/abcl/src/org/armedbear/lisp/Pathname.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Pathname.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/Pathname.java	Tue May 11 10:45:53 2010
@@ -1672,13 +1672,36 @@
             if (memq(Keyword.WILD_INFERIORS, directory)) {
                 return true;
             }
+            Cons d = (Cons) directory;
+            while (true) {
+                if (d.car() instanceof AbstractString) {
+                    String s = d.car().writeToString();
+                    if (s.contains("*")) {
+                        return true;
+                    }
+                }
+                if (d.cdr() == NIL || ! (d.cdr() instanceof Cons)) {
+                    break;
+                }
+                d = (Cons)d.cdr();
+            }
         }
         if (name == Keyword.WILD || name == Keyword.WILD_INFERIORS) {
             return true;
         }
+        if (name instanceof AbstractString) {
+            if (name.writeToString().contains("*")) {
+                return true;
+            }
+        }
         if (type == Keyword.WILD || type == Keyword.WILD_INFERIORS) {
             return true;
         }
+        if (type instanceof AbstractString) {
+            if (type.writeToString().contains("*")) {
+                return true;
+            }
+        }
         if (version == Keyword.WILD || version == Keyword.WILD_INFERIORS) {
             return true;
         }




More information about the armedbear-cvs mailing list