0.7.9.35:
authorChristophe Rhodes <csr21@cam.ac.uk>
Thu, 7 Nov 2002 14:59:32 +0000 (14:59 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Thu, 7 Nov 2002 14:59:32 +0000 (14:59 +0000)
Commit change to TRUENAME behaviour on files naming directories
... shout if anything breaks, please!

NEWS
src/code/filesys.lisp
src/code/target-pathname.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 660bcce..08ea6a0 100644 (file)
--- 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
index 2e80dcb..c34f732 100644 (file)
     (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))))))))
 \f
 ;;;; miscellaneous other operations
 
        ;; (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
index 7089003..eaa6cb6 100644 (file)
@@ -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))
index 835ec69..26ebe00 100644 (file)
@@ -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"