[BFAV] "Couldn't delete old version of file" exception revisited
Brent Vukmer
bvukmer at blackboard.com
Thu Feb 26 17:33:18 UTC 2004
>
> Do you mean that, for instance,
> ArchiveRepository>>downloadZips: should have
>
> file _ self repositoryDir forceNewFileNamed: fn.
> [file binary nextPutAll: response bodyBytes.]
> ensure: [file close].
> downloads add: fn.
>
> instead of
>
> file _ self repositoryDir forceNewFileNamed: fn.
> file binary nextPutAll: response bodyBytes.
> file close.
> downloads add: fn.
>
Yep! That kind of thing should be done wherever a file is opened.
And actually (at the risk of re-opening an old thread about ensure: and
file-handling), it should probably be:
[file _ self repositoryDir forceNewFileNamed: fn.
file binary nextPutAll: response bodyBytes.]
ensure: [file close].
More information about the Squeak-dev
mailing list
|