[Zope-Checkins] CVS: Zope2 - CopySupport.py:1.72.2.1

chrism@serenade.digicool.com chrism@serenade.digicool.com
Mon, 2 Jul 2001 13:25:14 -0400


Update of /cvs-repository/Zope2/lib/python/OFS
In directory serenade:/home/chrism/sandboxes/Zope24Branch/lib/python/OFS

Modified Files:
      Tag: Zope-2_4-branch
	CopySupport.py 
Log Message:
Collector 2257, rename deleted existing object before creating new object, causing manage_beforeDelete to do the wrong thing in some corner cases specific to user code which depended on it specifically *not* doing this.


--- Updated File CopySupport.py in package Zope2 --
--- CopySupport.py	2001/06/21 17:38:46	1.72
+++ CopySupport.py	2001/07/02 17:25:14	1.72.2.1
@@ -305,13 +305,13 @@
                       title='Rename Error',
                       message=sys.exc_info()[1],
                       action ='manage_main')
-        self._delObject(id)
         ob = aq_base(ob)
         ob._setId(new_id)
         
         # Note - because a rename always keeps the same context, we
         # can just leave the ownership info unchanged.
         self._setObject(new_id, ob, set_owner=0)
+        self._delObject(id)
 
         if REQUEST is not None:
             return self.manage_main(self, REQUEST, update_menu=1)