[Zope-dev] Zope 2.4.0 CopySupport changes seem wrong
Toby Dickenson
tdickenson@geminidataloggers.com
Thu, 26 Jul 2001 08:08:35 +0100
On Wed, 25 Jul 2001 08:16:44 -0400, Chris McDonough
<chrism@digicool.com> wrote:
> Can anybody provide a suggestion as to what to do in
>order to ... address the original collector issue's
>problem?
I suggest:
Create a class that hooks into transaction commit; look at ZPatterns
for an example of how to do this. Instances of this class will be
stored as a _v_deferred_deleter attribute of his link object.
manage_beforeDelete:
create the _v_deferred_deleter attribnute if self doesnt have one
self._v_deferred_deleter.deleted =3D 1
manage_afterAdd:
if self has a _v_deferred_deleter attribute:
self._v_deferred_deleter.deleted =3D 0
at transaction commit:
if self._v_deferred_deleter.deleted:
really delete the file
remove self._v_deferred_deleter
=20
Toby Dickenson
tdickenson@geminidataloggers.com