Changeset 13017 for trunk/abcl/src/org


Ignore:
Timestamp:
11/10/10 22:23:05 (11 years ago)
Author:
Mark Evenson
Message:

Check type in MAKE-PATHNAME for :DIRECTORY components.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/Pathname.java

    r13006 r13017  
    12451245                    directory = list(Keyword.ABSOLUTE, Keyword.WILD);
    12461246                } else {
    1247                     directory = value;
     1247                  // a valid pathname directory is a string, a list of strings, nil, :wild, :unspecific
     1248                  // ??? would be nice to (deftype pathname-arg ()
     1249                  // '(or (member :wild :unspecific) string (and cons ,(mapcar ...
     1250                  // Is this possible?
     1251                  if ((value instanceof Cons
     1252                       // XXX check that the elements of a list are themselves valid
     1253                       || value == Keyword.UNSPECIFIC
     1254                       || value.equals(NIL))) {
     1255                      directory = value;
     1256                  } else {
     1257                      error(new TypeError("DIRECTORY argument not a string, list of strings, nil, :WILD, or :UNSPECIFIC.", value, NIL));
     1258                  }
    12481259                }
    12491260            } else if (key == Keyword.NAME) {
Note: See TracChangeset for help on using the changeset viewer.