X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ffd-stream.lisp;h=9c8ac6b9cb70728ba291db32c5570e2e4a2dcb5f;hb=024389e7e3db268f535e36d883b4efc9d7ea0f65;hp=7ca75d86f2983d00258e58591a47dbadb66dfcdc;hpb=be6abfb75a76eb69a417ff09fd6b0f41e708f8c3;p=sbcl.git diff --git a/src/code/fd-stream.lisp b/src/code/fd-stream.lisp index 7ca75d8..9c8ac6b 100644 --- a/src/code/fd-stream.lisp +++ b/src/code/fd-stream.lisp @@ -2405,14 +2405,17 @@ (:io (values t t sb!unix:o_rdwr)) (:probe (values t nil sb!unix:o_rdonly))) (declare (type index mask)) - (let* ((pathname (physicalize-pathname (merge-pathnames filename))) - (truename (probe-file pathname)) + (let* (;; PATHNAME is the pathname we associate with the stream. + (pathname (merge-pathnames filename)) + (physical (physicalize-pathname pathname)) + (truename (probe-file physical)) + ;; NAMESTRING is the native namestring we open the file with. (namestring (cond (truename (native-namestring truename :as-file t)) ((or (not input) (and input (eq if-does-not-exist :create)) (and (eq direction :io) (not if-does-not-exist-given))) - (native-namestring pathname :as-file t))))) + (native-namestring physical :as-file t))))) ;; Process if-exists argument if we are doing any output. (cond (output (unless if-exists-given @@ -2477,7 +2480,7 @@ (when (and output (= (logand orig-mode #o170000) #o40000)) (error 'simple-file-error - :pathname namestring + :pathname pathname :format-control "can't open ~S for output: is a directory" :format-arguments (list namestring)))