From 26148f0c8d7d35e1c5e1d363ade79552cbeb0386 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Thu, 7 Nov 2002 14:59:32 +0000 Subject: [PATCH] 0.7.9.35: Commit change to TRUENAME behaviour on files naming directories ... shout if anything breaks, please! --- NEWS | 3 +++ src/code/filesys.lisp | 15 +++++++-------- src/code/target-pathname.lisp | 2 +- version.lisp-expr | 2 +- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/NEWS b/NEWS index 660bcce..08ea6a0 100644 --- a/NEWS +++ b/NEWS @@ -1349,6 +1349,9 @@ changes in sbcl-0.7.10 relative to sbcl-0.7.9: * minor incompatible change: PCL now records the pathname of a file in which methods and the like are defined, rather than its truename. + * minor incompatible change: TRUENAME now considers the truename of + a file naming a directory to be the pathname with :DIRECTORY + component indicating that directory. * more systematization and improvement of CLOS and MOP conformance in PCL (thanks to Gerd Moellman and Pierre Mai): ** the standard ANSI CL generic function NO-NEXT-METHOD is now diff --git a/src/code/filesys.lisp b/src/code/filesys.lisp index 2e80dcb..c34f732 100644 --- a/src/code/filesys.lisp +++ b/src/code/filesys.lisp @@ -725,8 +725,11 @@ (when (and namestring (sb!unix:unix-file-kind namestring t)) (let ((trueishname (sb!unix:unix-resolve-links namestring))) (when trueishname - (let ((*ignore-wildcards* t)) - (pathname (sb!unix:unix-simplify-pathname trueishname)))))))) + (let* ((*ignore-wildcards* t) + (name (sb!unix:unix-simplify-pathname trueishname))) + (if (eq (sb!unix:unix-file-kind name) :directory) + (pathname (concatenate 'string name "/")) + (pathname name)))))))) ;;;; miscellaneous other operations @@ -824,14 +827,10 @@ ;; (which can arise when e.g. multiple symlinks map to the ;; same truename). (truenames (make-hash-table :test #'equal)) - (merged-pathname (merge-pathnames pathname - *default-pathname-defaults*))) + (merged-pathname (merge-pathnames pathname))) (!enumerate-matches (match merged-pathname) (let* ((*ignore-wildcards* t) - (truename (truename (if (eq (sb!unix:unix-file-kind match) - :directory) - (concatenate 'string match "/") - match)))) + (truename (truename match))) (setf (gethash (namestring truename) truenames) truename))) (mapcar #'cdr diff --git a/src/code/target-pathname.lisp b/src/code/target-pathname.lisp index 7089003..eaa6cb6 100644 --- a/src/code/target-pathname.lisp +++ b/src/code/target-pathname.lisp @@ -909,7 +909,7 @@ a host-structure or string." (declare (type pathname-designator in-pathname)) (with-pathname (pathname in-pathname) (with-pathname (wildname in-wildname) - (macrolet ((frob (field &optional (op 'components-match )) + (macrolet ((frob (field &optional (op 'components-match)) `(or (null (,field wildname)) (,op (,field pathname) (,field wildname))))) (and (or (null (%pathname-host wildname)) diff --git a/version.lisp-expr b/version.lisp-expr index 835ec69..26ebe00 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -18,4 +18,4 @@ ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.7.9.34" +"0.7.9.35" -- 1.7.10.4