Commit 03fb4e1b authored by Andreas Jung's avatar Andreas Jung

- Collector #1852: fixed wrong URL construction in webdav.davcmds

parent 41d6651f
...@@ -38,6 +38,8 @@ Zope Changes ...@@ -38,6 +38,8 @@ Zope Changes
Bugs Fixed Bugs Fixed
- Collector #1852: fixed wrong URL construction in webdav.davcmds
- Collector #1844: fixed whitespace handling in the ZMI "Find" tab - Collector #1844: fixed whitespace handling in the ZMI "Find" tab
- Collector #1813: removed spurious inclusion of CMFBTreeFolder. - Collector #1813: removed spurious inclusion of CMFBTreeFolder.
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
$Id$ $Id$
""" """
import sys, os import sys
from common import absattr, aq_base, urlfix, urlbase from common import absattr, aq_base, urlfix, urlbase
from OFS.PropertySheets import DAVProperties from OFS.PropertySheets import DAVProperties
from LockItem import LockItem from LockItem import LockItem
...@@ -29,6 +29,7 @@ from AccessControl import getSecurityManager ...@@ -29,6 +29,7 @@ from AccessControl import getSecurityManager
from zExceptions import BadRequest, Forbidden from zExceptions import BadRequest, Forbidden
from common import isDavCollection from common import isDavCollection
from common import PreconditionFailed from common import PreconditionFailed
from ZConfig.url import urljoin
import transaction import transaction
def safe_quote(url, mark=r'%'): def safe_quote(url, mark=r'%'):
...@@ -162,7 +163,7 @@ class PropFind: ...@@ -162,7 +163,7 @@ class PropFind:
if dflag: if dflag:
ob._p_deactivate() ob._p_deactivate()
elif hasattr(ob, '__dav_resource__'): elif hasattr(ob, '__dav_resource__'):
uri=os.path.join(url, absattr(ob.id)) uri=urljoin(url, absattr(ob.id))
depth=depth=='infinity' and depth or 0 depth=depth=='infinity' and depth or 0
self.apply(ob, uri, depth, result, top=0) self.apply(ob, uri, depth, result, top=0)
if dflag: if dflag:
...@@ -402,7 +403,7 @@ class Lock: ...@@ -402,7 +403,7 @@ class Lock:
if depth == 'infinity' and iscol: if depth == 'infinity' and iscol:
for ob in obj.objectValues(): for ob in obj.objectValues():
if hasattr(obj, '__dav_resource__'): if hasattr(obj, '__dav_resource__'):
uri = os.path.join(url, absattr(ob.id)) uri = urljoin(url, absattr(ob.id))
self.apply(ob, creator, depth, token, result, self.apply(ob, creator, depth, token, result,
uri, top=0) uri, top=0)
if not top: if not top:
...@@ -465,7 +466,7 @@ class Unlock: ...@@ -465,7 +466,7 @@ class Unlock:
for ob in obj.objectValues(): for ob in obj.objectValues():
if hasattr(ob, '__dav_resource__') and \ if hasattr(ob, '__dav_resource__') and \
WriteLockInterface.isImplementedBy(ob): WriteLockInterface.isImplementedBy(ob):
uri = os.path.join(url, absattr(ob.id)) uri = urljoin(url, absattr(ob.id))
self.apply(ob, token, uri, result, top=0) self.apply(ob, token, uri, result, top=0)
if not top: if not top:
return result return result
...@@ -519,7 +520,7 @@ class DeleteCollection: ...@@ -519,7 +520,7 @@ class DeleteCollection:
for ob in obj.objectValues(): for ob in obj.objectValues():
dflag = hasattr(ob,'_p_changed') and (ob._p_changed == None) dflag = hasattr(ob,'_p_changed') and (ob._p_changed == None)
if hasattr(ob, '__dav_resource__'): if hasattr(ob, '__dav_resource__'):
uri = os.path.join(url, absattr(ob.id)) uri = urljoin(url, absattr(ob.id))
self.apply(ob, token, user, uri, result, top=0) self.apply(ob, token, user, uri, result, top=0)
if dflag: if dflag:
ob._p_deactivate() ob._p_deactivate()
......
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