From 6c3e59fd11400734a8b9ec9942858724a36e3f1d Mon Sep 17 00:00:00 2001 From: Unrud Date: Fri, 5 Aug 2016 17:19:57 +0200 Subject: [PATCH] Make sure that the root collection exists. Since the collections are not directly in **filesystem_path** anymore, the folder is not created by ``Collection.acquire_lock``. --- radicale/storage.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/radicale/storage.py b/radicale/storage.py index e70028c..cab6641 100644 --- a/radicale/storage.py +++ b/radicale/storage.py @@ -262,6 +262,8 @@ class BaseCollection: The ``path`` is relative. + The root collection "/" must always exist. + """ raise NotImplementedError @@ -433,6 +435,8 @@ class Collection(BaseCollection): # Try to guess if the path leads to a collection or an item folder = cls._get_collection_root_folder() + # Create the root collection + cls._makedirs_synced(folder, exist_ok=True) try: filesystem_path = path_to_filesystem(folder, sane_path) except ValueError: