From 1394636aef3b85be4fb6ef4a5424115aa2022d99 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Sun, 17 Mar 2002 03:47:18 +0000 Subject: [PATCH] 0.7.1.43 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 | 2 +- tests/filesys.pure.lisp | 16 ++++++++++++++++ version.lisp-expr | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/code/fd-stream.lisp b/src/code/fd-stream.lisp index 2e461b7..c779625 100644 --- a/src/code/fd-stream.lisp +++ b/src/code/fd-stream.lisp @@ -1079,7 +1079,7 @@ (: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)) diff --git a/tests/filesys.pure.lisp b/tests/filesys.pure.lisp index 559e0fd..a1800e2 100644 --- a/tests/filesys.pure.lisp +++ b/tests/filesys.pure.lisp @@ -36,6 +36,22 @@ (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. ;;; diff --git a/version.lisp-expr b/version.lisp-expr index 6406f30..d75b24a 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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" -- 1.7.10.4