[Calypso] [PATCH] Make sure data_path() doesn't end in a '/'

Petter Reinholdtsen pere at hungry.com
Sun Jan 24 03:39:15 PST 2016


A third patch from Guido:

  We expect the same form url_path() in is_collection() and end up in an
  endless loop otherwise.
    
  Found by caldav-testers CalDAV/get.xml

diff --git a/calypso/paths.py b/calypso/paths.py
index d69b667..fe72e91 100644
--- a/calypso/paths.py
+++ b/calypso/paths.py
@@ -43,7 +43,7 @@ def url_to_owner(path):
 #
 
 def data_root():
-    return os.path.expanduser(config.get("storage", "folder"))
+    return os.path.expanduser(config.get("storage", "folder")).rstrip('/')
 
 
 #

-- 
Happy hacking
Petter Reinholdtsen


More information about the Calypso mailing list