Changeset 15444
- Timestamp:
- 10/29/20 16:54:38 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/probe_file.java
r15408 r15444 117 117 } 118 118 Pathname defaultedPathname = (Pathname)Pathname.MERGE_PATHNAMES.execute(pathname); 119 if (defaultedPathname instanceof JarPathname) { 120 if (defaultedPathname.getName().equals(NIL) 121 && defaultedPathname.getType().equals(NIL)) { 122 return Symbol.PROBE_FILE.execute(defaultedPathname); 123 } 124 SimpleString lastDirectory = (SimpleString)Symbol.FILE_NAMESTRING.execute(defaultedPathname); 125 LispObject appendedDirectory 126 = defaultedPathname.getDirectory().reverse().push(lastDirectory).reverse(); 127 defaultedPathname.setDirectory(appendedDirectory); 128 return Symbol.PROBE_FILE.execute(defaultedPathname); 129 } 130 119 131 File file = defaultedPathname.getFile(); 120 return file.isDirectory() ? Pathname.getDirectoryPathname(file) : NIL; 132 if (file == null || !file.isDirectory()) { 133 return NIL; 134 } 135 136 if (defaultedPathname.getName().equals(NIL) 137 && defaultedPathname.getType().equals(NIL)) { 138 return Symbol.PROBE_FILE.execute(defaultedPathname); 139 } 140 SimpleString lastDirectory = (SimpleString)Symbol.FILE_NAMESTRING.execute(defaultedPathname); 141 LispObject appendedDirectory 142 = defaultedPathname.getDirectory().reverse().push(lastDirectory).reverse(); 143 defaultedPathname.setDirectory(appendedDirectory); 144 return Symbol.PROBE_FILE.execute(defaultedPathname); 121 145 } 122 146 }; … … 133 157 134 158 private LispObject isDirectory(Pathname p) { 135 File file = p.getFile();136 return file.isDirectory() ? T : NIL;159 LispObject result = PROBE_DIRECTORY.execute(p); 160 return result.equals(NIL) ? NIL : T; 137 161 } 138 162
Note: See TracChangeset
for help on using the changeset viewer.