Changeset 15032
- Timestamp:
- 06/01/17 06:46:20 (6 years ago)
- Location:
- trunk/abcl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/Pathname.java
r14987 r15032 791 791 // is, both NIL and :UNSPECIFIC cause the component not to appear in 792 792 // the namestring." 19.2.2.2.3.1 793 if (directory != NIL ) {793 if (directory != NIL && directory != Keyword.UNSPECIFIC) { 794 794 final char separatorChar = '/'; 795 795 LispObject temp = directory; … … 820 820 } else if (part == Keyword.UP) { 821 821 sb.append(".."); 822 } else {823 error(new FileError("Unsupported directory component " + part.princToString() + ".",824 this));825 822 } 826 823 sb.append(separatorChar); … … 1481 1478 1482 1479 p.version = version; 1480 p.validateDirectory(true); 1483 1481 return p; 1484 1482 } … … 1502 1500 private final boolean validateDirectory(boolean signalError) { 1503 1501 LispObject temp = directory; 1502 if (temp == Keyword.UNSPECIFIC) { 1503 return true; 1504 } 1504 1505 while (temp != NIL) { 1505 1506 LispObject first = temp.car(); … … 1518 1519 return false; 1519 1520 } 1521 } else if (first != Keyword.RELATIVE 1522 && first != Keyword.WILD 1523 && first != Keyword.UP 1524 && first != Keyword.BACK 1525 && !(first instanceof AbstractString)) { 1526 if (signalError) { 1527 error(new FileError("Unsupported directory component " + first.princToString() + ".", 1528 this)); 1529 } 1530 return false; 1520 1531 } 1521 1532 } -
trunk/abcl/test/lisp/abcl/pathname-tests.lisp
r14247 r15032 1723 1723 :wild :wild :wild (:absolute :wild)) 1724 1724 1725 1726 (deftest pathname.make-pathname.3 1727 (signals-error 1728 (make-pathname :directory '(:absolute ("a" "b"))) 1729 'file-error) 1730 t) 1731 1732 (deftest pathname.make-pathname.4 1733 (directory-namestring (make-pathname :directory :unspecific)) 1734 "")
Note: See TracChangeset
for help on using the changeset viewer.