Commit 77e3bb9d authored by Sidnei da Silva's avatar Sidnei da Silva

- webdav.Resource: during COPY, manage_afterClone was called way

        too early, thus the object wasn't bound to the database and
        couldn't find a context. Changed to behave the same way as
        CopySupport.
parent e1b1b897
......@@ -46,6 +46,11 @@ Zope Changes
Bugs fixed
- webdav.Resource: during COPY, manage_afterClone was called way
too early, thus the object wasn't bound to the database and
couldn't find a context. Changed to behave the same way as
CopySupport.
- RAMCacheManager: opimized performance by using cPickle instead
of pickle and by using the highest pickle protocol available
instead of using ASCII pickles (patch by Dieter Maurer)
......
......@@ -366,13 +366,9 @@ class Resource(ExtensionClass.Base, Lockable.LockableItem):
else:
raise Locked, 'Destination is locked.'
ob=self._getCopy(parent)
ob.manage_afterClone(ob)
# We remove any locks from the copied object because webdav clients
# don't track the lock status and the lock token for copied resources
ob.wl_clearLocks()
ob = self._getCopy(parent)
ob._setId(name)
if depth=='0' and isDavCollection(ob):
for id in ob.objectIds():
ob._delObject(id)
......@@ -381,6 +377,11 @@ class Resource(ExtensionClass.Base, Lockable.LockableItem):
self.dav__validate(object, 'DELETE', REQUEST)
parent._delObject(name)
parent._setObject(name, ob)
ob = parent._getOb(name)
ob.manage_afterClone(ob)
# We remove any locks from the copied object because webdav clients
# don't track the lock status and the lock token for copied resources
ob.wl_clearLocks()
RESPONSE.setStatus(existing and 204 or 201)
if not existing:
RESPONSE.setHeader('Location', dest)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment