Changeset 15369
- Timestamp:
- 08/21/20 15:38:51 (3 years ago)
- Location:
- trunk/abcl/src/org/armedbear/lisp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/directory.lisp
r14921 r15369 97 97 entries))))) 98 98 99 ;;; The extension to ANSI via :RESOLVE-SYMLINKS was added as 100 ;;; <https://abcl.org/trac/ticket/340>, in which it was argued that 101 ;;; symlinks should be considered contents of a directory, and that in 102 ;;; any event, performing a DIRECTORY on a dangling symlink should not 103 ;;; signal an error. 104 ;;; 105 ;;; See <https://abcl.org/trac/changeset/14624> for additional 106 ;;; information on implementation decision. 99 107 (defun directory (pathspec &key (resolve-symlinks nil)) 100 108 "Determines which, if any, files that are present in the file system have names matching PATHSPEC, and returns a fresh list of pathnames corresponding to the potential truenames of those files. … … 133 141 (let ((entries (list-directories-with-wildcards 134 142 namestring nil resolve-symlinks)) 135 (matching-entries ()))143 matching-entries) 136 144 (dolist (entry entries) 137 (when 138 (or 139 (and 140 (file-directory-p entry :wild-error-p nil) 141 (pathname-match-p (file-namestring (pathname-as-file entry)) 142 (file-namestring pathname))) 143 (pathname-match-p (or (file-namestring entry) "") 144 (file-namestring pathname))) 145 (when (pathname-match-p entry pathname) 145 146 (push 146 147 (if resolve-symlinks -
trunk/abcl/src/org/armedbear/lisp/pathnames.lisp
r15107 r15369 56 56 (labels ((split-string (delim str) 57 57 (flet ((finder (char) (find char delim))) 58 (loop for x = (position-if-not #'finder str) then 59 (position-if-not #'finder str :start (or y (length str))) 60 for y = (position-if #'finder str :start x) then 61 (position-if #'finder str :start (or x (length str))) while x 62 collect (subseq str x y)))) 58 (loop 59 :for x = (position-if-not #'finder str) 60 :then (position-if-not #'finder str :start (or y (length str))) 61 :for y = (position-if #'finder str :start (or x (length str))) 62 :then (position-if #'finder str :start (or x (length str))) 63 :while x 64 :collect (subseq str x y)))) 63 65 (positions-larger (thing substrings previous-pos) 64 66 (let ((new-pos (search (car substrings)
Note: See TracChangeset
for help on using the changeset viewer.