[Openmcl-devel] close on abort
bryan o'connor
bryan-lisp at lunch.org
Mon Sep 5 02:04:37 PDT 2005
> (with-open-file (out (full-pathname "other/x") :direction :output
> :if-exists :supersede)
> (abort))
actually, this doesn't work quite right if the file already
exists and you don't have a type (extension). the file-stream
code calls cl:rename-file which, per spec, uses merge-pathnames
to create the new-name. the extension ends up getting set on the
new-name.
if file-streams always contain full pathnames (which at this late
hour seems perfectly reasonable to me), we can bypass cl:rename-file
and directly call ccl::unix-rename.
what do you think?
unfortunately your quick fix has now become:
(full-pathname (make-pathname :directory "other"
:name "x"
:type :unspecific))
...bryan
More information about the Openmcl-devel
mailing list