[Openmcl-devel] close on abort
Gary Byers
gb at clozure.com
Mon Sep 5 01:57:01 PDT 2005
Aside from getting the pathname wrong, some of this code seems
to call CL:RENAME-FILE with an :IF-EXISTS keyword argument.
CL:RENAME-FILE isn't really supposed to take any keyword arguments.
But ...
If the lower-level function that actually does the renaming complains
that the output file already exists, it'd make sense if
(rename-file file new-name :if-exists :overwrite)
found some way to overwrite the existing file.
On Mon, 5 Sep 2005, bryan o'connor wrote:
> hi David,
>
> the problem seems to be that the filename associated with a
> file-stream doesn't get set with a full pathname. i've got a
> fix here but the cvs repo is currently bleeding so i can't
> fully test it and check it in. there also seems to be some
> cleanup issues where .tem files don't always get deleted.
>
> a temporary fix would be to wrap your path namestring with
> full-pathname.
>
> (with-open-file (out (full-pathname "other/x") :direction :output
> :if-exists :supersede)
> (abort))
>
>
> ..bryan
>
>
>> Hi,
>>
>> when a computation aborted with an open file in another directory, such as
>> in:
>>
>> (with-open-file (out "other/x" :direction :output :if-exists :supersede)
>> (abort))
>>
>> and the file "other/x" already exists, an error is reported:
>>
>> > Error in process listener(1): Failed to rename /Users/dvd/
>> Workplace/Davidashen/QST/other/3334893877.tem to /Users/dvd/
>> Workplace/Davidashen/QST/other/other/x.tem: -2
>> > While executing: RENAME-FILE
>> > Type :POP to abort.
>> Type :? for other options.
>> 1 >
>>
>> Please note that the file it tries to rename to has the wrong name. I
>> couldn't trace it easily to where this happens.
>>
>> David
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>
More information about the Openmcl-devel
mailing list