[Openmcl-devel] Regression in pathname-device in 1.3
danieldickison at gmail.com
Fri Feb 13 21:03:44 UTC 2009
On Thu, Feb 12, 2009 at 5:51 PM, Gary Byers <gb at clozure.com> wrote:
> At first glance, that looks like a case where (PATHNAME stream) is
> returning a STRING, not a pathname.
> ? (with-open-file (f "/home/gb/ccl-init.lisp") (pathname f))
> That's wrong; the function PATHNAME should return a PATHNAME or die trying:
> Index: level-1/l1-files.lisp
> --- level-1/l1-files.lisp (revision 11733)
> +++ level-1/l1-files.lisp (working copy)
> @@ -490,7 +490,7 @@
> (string (string-to-pathname path))))
> (defun %path-from-stream (stream)
> - (or (stream-filename stream) (error "Can't determine pathname of ~S ."
> stream))) ; ???
> + (or (pathname (stream-filename stream)) (error "Can't determine pathname
> of ~S ." stream))) ; ???
> ;Like (pathname stream) except returns NIL rather than error when there's
> ;filename associated with the stream.
Yes, that makes sense. Thanks for the fix!
(BTW, the reason I encountered this bug was because it was causing
NAMESTRING to fail on streams opened with a namestring path. I dug as
far as PATHNAME-DEVICE, but didn't dig deep enough to get to the
More information about the Openmcl-devel