Skip to content

Commit 6adc85c

Browse files
committed
Handle symlinks to directories in LispWorks
If a symlink points to a directory, then LW will, if link transparency is false (which it is) return its name as a filename from directory: as a name whose file-namestring is not nil in other words. Deal with this in directory-entries by appending the name to the directory components.
1 parent 10b61e5 commit 6adc85c

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

quicklisp/impl-util.lisp

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,20 @@ quicklisp at CL startup."
247247
(directory (merge-pathnames *wild-entry* directory)
248248
#+scl :truenamep #+scl nil))
249249
(:implementation lispworks
250-
(directory (merge-pathnames *wild-entry* directory)
250+
;; if the directory is a symlink and link transparency is false
251+
;; then it will have filename components which should be the last
252+
;; element of the directory component. If that's the case then
253+
;; append them to the directory where they belong.
254+
(let ((filename (file-namestring directory)))
255+
(directory (merge-pathnames *wild-entry*
256+
(if (not filename)
257+
directory
258+
(make-pathname
259+
:directory (append (pathname-directory directory)
260+
(list filename))
261+
:defaults directory)))
251262
#+lispworks :directories #+lispworks t
252-
#+lispworks :link-transparency #+lispworks nil))
263+
#+lispworks :link-transparency #+lispworks nil)))
253264
(:implementation ecl
254265
(nconc
255266
(directory (merge-pathnames *wild-entry* directory)

0 commit comments

Comments
 (0)