[BFAV] "Couldn't delete old version of file" exception revisited
Frank Shearar
frank.shearar at rnid.org.uk
Fri Feb 27 12:27:52 UTC 2004
> > Typically what happens to cause this is a filestream gets
> left open and
> > is awaiting execution by the registry. A garbage collect
> will detect the
> > weak oop and cause the executor to run, closing the file and
> > releasing the FILE pointer in the VM. Then you can delete the file.
> >
> > Most likely the answer is a simple code change to make sure
> the file is
> > closed explicitly.
>
> Thanks Tim. Yep, that looks like the culprit all right.
> I've trawled through the file-handling code putting an
> ensure: block around every file-opening, that closes the file
> explicitly.
Arg, and here I was going to send a CS! OK, just as a double-check,
I did the same trawling and saw #closes in:
ArchiveRepository>>appendListingBytes:
ArchiveRepository>>downloadListingVersion
ArchiveRepository>>downloadListingZip
ArchiveRepository>>downloadZips:
ArchiveRepository>>downloadZipsListForIds:
ArchiveRepository>>downloadZipsListFrom:to:
ArchiveRepository>>extractAndSaveAttachmentsForId:
Did you or I miss any?
frank
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 2092 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040227/104bffc7/winmail.bin
More information about the Squeak-dev
mailing list
|