[Zope-Checkins] CVS: Zope2 - Resource.py:1.37.16.4
Brian Lloyd
brian@digicool.com
Tue, 27 Mar 2001 14:50:38 -0500 (EST)
Update of /cvs-repository/Zope2/lib/python/webdav
In directory korak:/home/brian/temp/zope-23-branch/lib/python/webdav
Modified Files:
Tag: zope-2_3-branch
Resource.py
Log Message:
updated COPY/Move fix
--- Updated File Resource.py in package Zope2 --
--- Resource.py 2001/03/27 19:25:55 1.37.16.3
+++ Resource.py 2001/03/27 19:50:37 1.37.16.4
@@ -267,8 +267,8 @@
if not dest:
raise 'Bad Request', 'Invalid Destination header.'
- path, (bad1, bad2, pct) = REQUEST.physicalPathFromURL(dest)
- if pct < 1 or bad2:
+ try: path = REQUEST.physicalPathFromURL(dest)
+ except ValueError:
raise 'Bad Request', 'Invalid Destination header'
name = path.pop()
@@ -328,9 +328,10 @@
raise 'Method Not Allowed', 'This object may not be moved.'
dest=REQUEST.get_header('Destination', '')
- path, (bad1, bad2, pct) = REQUEST.physicalPathFromURL(dest)
- if pct < 1 or bad2:
+ try: path = REQUEST.physicalPathFromURL(dest)
+ except ValueError:
raise 'Bad Request', 'No destination given'
+
flag=REQUEST.get_header('Overwrite', 'F')
flag=string.upper(flag)