From b810d61ce3d309c0437a87edcfd527e99399b3e6 Mon Sep 17 00:00:00 2001 From: Unrud Date: Sat, 21 May 2016 01:41:00 +0200 Subject: [PATCH] Don't sanitize local paths using posixpath This doesn't work as expected on Windows. --- radicale/storage.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/radicale/storage.py b/radicale/storage.py index 982026f..a6f744f 100644 --- a/radicale/storage.py +++ b/radicale/storage.py @@ -97,7 +97,6 @@ def path_to_filesystem(root, *paths): Conversion is done in a secure manner, or raises ``ValueError``. """ - root = sanitize_path(root) paths = [sanitize_path(path).strip("/") for path in paths] safe_path = root for path in paths: @@ -303,7 +302,7 @@ class Collection(BaseCollection): _, directories, _ = next(os.walk(collection._filesystem_path)) for sub_path in directories: full_path = os.path.join(collection._filesystem_path, sub_path) - if os.path.exists(path_to_filesystem(full_path)): + if os.path.exists(full_path): yield cls(posixpath.join(path, sub_path)) @classmethod