Changeset 14621
- Timestamp:
- 01/30/14 14:27:58 (10 years ago)
- Location:
- trunk/abcl
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/Pathname.java
r14619 r14621 1642 1642 File file = files[i]; 1643 1643 Pathname p; 1644 1645 1646 1647 1648 1649 1650 1651 1644 String path; 1645 if (resolveSymlinks == NIL) { 1646 path = file.getAbsolutePath(); 1647 } else { 1648 path = file.getCanonicalPath(); 1649 } 1650 URI pathURI = (new File(path)).toURI(); 1651 p = new Pathname(pathURI.toString()); 1652 1652 result = new Cons(p, result); 1653 1653 } … … 2037 2037 } 2038 2038 // CLtLv2 MERGE-PATHNAMES 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2039 2040 // "[T]he missing components in the given pathname are filled 2041 // in from the defaults pathname, except that if no version is 2042 // specified the default version is used." 2043 2044 // "The merging rules for the version are more complicated and 2045 // depend on whether the pathname specifies a name. If the 2046 // pathname doesn't specify a name, then the version, if not 2047 // provided, will come from the defaults, just like the other 2048 // components. However, if the pathname does specify a name, 2049 // then the version is not affected by the defaults. The 2050 // reason is that the version ``belongs to'' some other file 2051 // name and is unlikely to have anything to do with the new 2052 // one. Finally, if this process leaves the 2053 // version missing, the default version is used." 2054 2054 2055 2055 if (p.version != NIL) { … … 2203 2203 Cons jars = (Cons) pathname.device; 2204 2204 LispObject o = jars.car(); 2205 2206 2207 2205 if (!(o instanceof Pathname)) { 2206 return doTruenameExit(pathname, errorIfDoesNotExist); 2207 } 2208 2208 if (o instanceof Pathname 2209 2209 && !(((Pathname)o).isURL()) … … 2283 2283 } 2284 2284 error: 2285 2285 return doTruenameExit(pathname, errorIfDoesNotExist); 2286 2286 } 2287 2287 -
trunk/abcl/src/org/armedbear/lisp/directory.lisp
r14619 r14621 135 135 (matching-entries ())) 136 136 (dolist (entry entries) 137 138 139 140 141 142 143 144 145 146 147 148 137 (when 138 (or 139 (and 140 (file-directory-p entry) 141 (pathname-match-p (file-namestring (pathname-as-file entry)) 142 (file-namestring pathname))) 143 (pathname-match-p (or (file-namestring entry) "") (file-namestring pathname))) 144 (push 145 (if resolve-symlinks 146 (truename entry) 147 entry) 148 matching-entries))) 149 149 matching-entries)))) 150 150 ;; Not wild. -
trunk/abcl/test/lisp/abcl/wild-pathnames.lisp
r14620 r14621 14 14 (let ((file (merge-pathnames file *temp-directory-root*))) 15 15 (ensure-directories-exist (directory-namestring file)) 16 17 16 (unless (probe-file file) 17 (touch file))))) 18 18 19 19 (defun remove-wild-test-hierarchy () 20 20 (ignore-errors 21 21 (delete-directory-and-files *temp-directory-root*))) 22 22 23 23 (defmacro with-test-directories (&rest body) … … 33 33 34 34 (deftest wild-pathnames.1 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 35 (with-test-directories 36 (let ((results 37 (directory (merge-pathnames "**/*.ext" 38 *temp-directory-root*))) 39 (expected 40 (loop :for file :in *test-files* 41 :collecting (merge-pathnames file 42 *temp-directory-root*)))) 43 (values 44 (eq (length results) (length expected)) 45 ;; link --> file is not resolved by change in DIRECTORY to :RESOLVE-SYMLINKS nil 46 results 47 expected 48 (set-equal (mapcar #'truename results) 49 (mapcar #'truename expected))))) 50 50 t) 51 51 … … 59 59 t) 60 60 61 61 62 62
Note: See TracChangeset
for help on using the changeset viewer.