Update of /cvs-repository/Packages/webdav
In directory cvs.zope.org:/tmp/cvs-serv7491/lib/python/webdav

Modified Files:
      Tag: Zope-2_7-branch
        davcmds.py 
Log Message:
      - Collector #1852: fixed wrong URL construction in webdav.davcmds


=== Packages/webdav/davcmds.py 1.20.66.2 => 1.20.66.3 ===
--- Packages/webdav/davcmds.py:1.20.66.2        Mon Nov 17 17:34:22 2003
+++ Packages/webdav/davcmds.py  Thu Jul 28 06:16:46 2005
@@ -16,7 +16,7 @@
 $Id$
 """
 
-import sys, os
+import sys
 from common import absattr, aq_base, urlfix, urlbase
 from OFS.PropertySheets import DAVProperties
 from LockItem import LockItem
@@ -29,6 +29,7 @@
 from zExceptions import BadRequest, Forbidden
 from common import isDavCollection
 from common import PreconditionFailed
+from ZConfig.url import urljoin
 
 def safe_quote(url, mark=r'%'):
     if url.find(mark) > -1:
@@ -161,7 +162,7 @@
                     if dflag:
                         ob._p_deactivate()
                 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
                     self.apply(ob, uri, depth, result, top=0)
                     if dflag:
@@ -404,7 +405,7 @@
         if depth == 'infinity' and iscol:
             for ob in obj.objectValues():
                 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,
                                uri, top=0)
         if not top:
@@ -467,7 +468,7 @@
             for ob in obj.objectValues():
                 if hasattr(ob, '__dav_resource__') and \
                    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)
         if not top:
             return result
@@ -521,7 +522,7 @@
             for ob in obj.objectValues():
                 dflag = hasattr(ob,'_p_changed') and (ob._p_changed == None)
                 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)
                     if dflag:
                         ob._p_deactivate()

_______________________________________________
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins

Reply via email to