0.7.1.43
authorDaniel Barlow <dan@telent.net>
Sun, 17 Mar 2002 03:47:18 +0000 (03:47 +0000)
committerDaniel Barlow <dan@telent.net>
Sun, 17 Mar 2002 03:47:18 +0000 (03:47 +0000)
In OPEN, the pathname is now merged against
*default-pathname-defaults* before access to the filesystem.
Failure to do this breaks OPEN on relative pathnames when
*default-pathname-defaults* is not the Unix cwd

src/code/fd-stream.lisp
tests/filesys.pure.lisp
version.lisp-expr

index 2e461b7..c779625 100644 (file)
        (:io     (values   t   t sb!unix:o_rdwr))
        (:probe  (values   t nil sb!unix:o_rdonly)))
     (declare (type index mask))
-    (let* ((pathname (pathname filename))
+    (let* ((pathname (merge-pathnames filename))
           (namestring
            (cond ((unix-namestring pathname input))
                  ((and input (eq if-does-not-exist :create))
index 559e0fd..a1800e2 100644 (file)
                             (namestring pathname)))
                   dir)))
 
+;;; Set *default-pathname-defaults* to something other than the unix
+;;; cwd, to catch functions which access the filesystem without
+;;; merging properly.  We should test more functions than just OPEN
+;;; here, of course
+
+(let ((*default-pathname-defaults*
+       (make-pathname :directory
+                     (butlast
+                      (pathname-directory *default-pathname-defaults*))
+                     :defaults *default-pathname-defaults*)))
+  ;; SBCL 0.7.1.2 failed to merge on OPEN
+  (with-open-file (i "tests/filesys.pure.lisp")
+      (assert i)))
+  
+
+
 ;;; ANSI: FILE-LENGTH should signal an error of type TYPE-ERROR if
 ;;; STREAM is not a stream associated with a file.
 ;;;
index 6406f30..d75b24a 100644 (file)
@@ -18,4 +18,4 @@
 ;;; for internal versions, especially for internal versions off the
 ;;; main CVS branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
 
-"0.7.1.42"
+"0.7.1.43"