Changeset 15448
- Timestamp:
- 10/29/20 16:54:45 (2 years ago)
- Location:
- trunk/abcl/src/org/armedbear/lisp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/Pathname.java
r15445 r15448 54 54 } 55 55 56 p rotectedstatic Pathname create(Pathname p) {56 public static Pathname create(Pathname p) { 57 57 if (p instanceof JarPathname) { 58 return (JarPathname)JarPathname.create(p.getNamestring());58 return JarPathname.create((JarPathname)p); 59 59 } else if (p instanceof URLPathname) { 60 return (URLPathname)URLPathname.create(((URLPathname)p).getNamestringAsURL()); 60 return URLPathname.create((URLPathname)p); 61 } else if (p instanceof LogicalPathname) { 62 return LogicalPathname.create((LogicalPathname)p); 61 63 } else { 62 return new Pathname( p);64 return new Pathname((Pathname)p); 63 65 } 64 66 } … … 1729 1731 } else { 1730 1732 result.setDirectory(mergeDirectories(p.getDirectory(), d.getDirectory())); 1733 // Directories are always absolute in a JarPathname 1734 if (result instanceof JarPathname) { 1735 LispObject directories = result.getDirectory(); 1736 if ((!directories.car().equals(NIL)) 1737 && directories.car().equals(Keyword.RELATIVE)) { 1738 directories = directories.cdr().push(Keyword.ABSOLUTE); 1739 result.setDirectory(directories); 1740 } 1741 } 1731 1742 } 1732 1743 -
trunk/abcl/src/org/armedbear/lisp/URLPathname.java
r15441 r15448 60 60 61 61 public static URLPathname create(Pathname p) { 62 if (p instanceof URLPathname) { 63 URLPathname result = new URLPathname(); 64 result.copyFrom(p); 65 return result; 66 } 62 67 return (URLPathname)createFromFile((Pathname)p); 63 }64 65 public static URLPathname create(URLPathname p) {66 URLPathname result = new URLPathname();67 result.copyFrom(p);68 return result;69 68 } 70 69 … … 230 229 231 230 static public boolean hasExplicitFile(Pathname p) { 231 if (!p.getHost().listp()) { 232 return false; 233 } 232 234 LispObject scheme = Symbol.GETF.execute(p.getHost(), SCHEME, NIL); 233 235 return scheme.equalp(FILE);
Note: See TracChangeset
for help on using the changeset viewer.