Make sure data_path() doesn't end in a '/'
authorGuido Günther <agx@sigxcpu.org>
Sun, 24 Jan 2016 18:22:32 +0000 (19:22 +0100)
committerGuido Günther <agx@sigxcpu.org>
Sun, 24 Jan 2016 18:22:32 +0000 (19:22 +0100)
We expect the same form as urlpath in is_collection() and end up in an
endless loop in that function otherwise.

Found by caldav-testers CalDAV/get.xml

calypso/paths.py

index d69b6673489aa192ace6e836ac99c67f5a5f5ccb..fe72e913e53937a127962daf3ce939d5bd098151 100644 (file)
@@ -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('/')
 
 
 #