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

Guido Günther agx at sigxcpu.org
Sun Mar 30 06:41:44 PDT 2014


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
---
 calypso/paths.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/calypso/paths.py b/calypso/paths.py
index 11640aa..e9d12fb 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('/')
 
 #
 # Given a URL, convert it to an absolute path name by
-- 
1.9.0



More information about the Calypso mailing list