[Zope-Checkins] CVS: Zope/lib/python/OFS - CopySupport.py:1.85

Andreas Jung andreas@andreas-jung.com
Wed, 7 May 2003 12:04:23 -0400


Update of /cvs-repository/Zope/lib/python/OFS
In directory cvs.zope.org:/tmp/cvs-serv7407/lib/python/OFS

Modified Files:
	CopySupport.py 
Log Message:
Collector #905: Locked objects can no longer be renamed


=== Zope/lib/python/OFS/CopySupport.py 1.84 => 1.85 ===
--- Zope/lib/python/OFS/CopySupport.py:1.84	Sun Feb  2 08:46:27 2003
+++ Zope/lib/python/OFS/CopySupport.py	Wed May  7 12:04:22 2003
@@ -237,6 +237,8 @@
                       message=sys.exc_info()[1],
                       action ='manage_main')
         ob=self._getOb(id)
+        if ob.wl_isLocked():
+            raise ResourceLockedError, 'Object "%s" is locked via WebDAV' % ob.getId()
         if not ob.cb_isMoveable():
             raise CopyError, eNotSupported % id
         self._verifyObjectPaste(ob)