Changeset 14601
- Timestamp:
- 01/11/14 15:36:10 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/Pathname.java
r14466 r14601 178 178 } 179 179 } 180 181 182 183 184 185 186 187 188 180 if (p.version != NIL) { 181 if (p.version instanceof Symbol) { 182 version = p.version; 183 } else if (p.version instanceof LispInteger) { 184 version = p.version; 185 } else { 186 Debug.assertTrue(false); 187 } 188 } 189 189 } 190 190 … … 377 377 String uriPath = uri.getPath(); 378 378 if (null == uriPath) { 379 380 381 382 383 379 // We make an exception for forms like "file:z:/foo/path" 380 uriPath = uri.getSchemeSpecificPart(); 381 if (uriPath == null || uriPath.equals("")) { 382 error(new LispError("The URI has no path: " + uri)); 383 } 384 384 } 385 385 final File file = new File(uriPath); … … 403 403 } 404 404 String authority = uri.getAuthority(); 405 406 407 408 409 410 411 405 if (authority == null) { 406 authority = url.getAuthority(); 407 if (authority == null) { 408 Debug.trace(MessageFormat.format("{0} has a null authority.", 409 url)); 410 } 411 } 412 412 413 413 host = NIL; … … 415 415 host = host.push(new SimpleString(scheme)); 416 416 417 418 419 420 417 if (authority != null) { 418 host = host.push(AUTHORITY); 419 host = host.push(new SimpleString(authority)); 420 } 421 421 422 422 device = NIL; … … 655 655 for (int i = 0; i < jars.length; i++) { 656 656 prefix.append("jar:"); 657 658 659 660 657 LispObject component = jars[i]; 658 if (!(component instanceof Pathname)) { 659 return null; // If DEVICE is a CONS, it should only contain Pathname 660 } 661 661 if (! ((Pathname)component).isURL() && i == 0) { 662 662 sb.append("file:"); … … 1567 1567 args="directory &optional (resolve-symlinks t)", 1568 1568 returns="pathnames", 1569 doc="Lists the contents of DIRECTORY, optionally resolving symbolic links.")1569 doc="Lists the contents of DIRECTORY, optionally resolving symbolic links.") 1570 1570 private static class pf_list_directory extends Primitive { 1571 1571 pf_list_directory() {
Note: See TracChangeset
for help on using the changeset viewer.