diff --git a/radicale/storage/multifilesystem/__init__.py b/radicale/storage/multifilesystem/__init__.py index b7fdbc3..5e7c420 100644 --- a/radicale/storage/multifilesystem/__init__.py +++ b/radicale/storage/multifilesystem/__init__.py @@ -115,9 +115,9 @@ class Storage( _collection_class = Collection def __init__(self, configuration): + super().__init__(configuration) folder = configuration.get("storage", "filesystem_folder") self._makedirs_synced(folder) - super().__init__(configuration) def _get_collection_root_folder(self): filesystem_folder = self.configuration.get( diff --git a/radicale/storage/multifilesystem/create_collection.py b/radicale/storage/multifilesystem/create_collection.py index 1ebaa24..6be6345 100644 --- a/radicale/storage/multifilesystem/create_collection.py +++ b/radicale/storage/multifilesystem/create_collection.py @@ -24,9 +24,6 @@ from radicale import pathutils class StorageCreateCollectionMixin: - def __init__(self, configuration): - super().__init__(configuration) - def create_collection(self, href, items=None, props=None): folder = self._get_collection_root_folder() diff --git a/radicale/storage/multifilesystem/discover.py b/radicale/storage/multifilesystem/discover.py index 4c9aaa8..8c9a77c 100644 --- a/radicale/storage/multifilesystem/discover.py +++ b/radicale/storage/multifilesystem/discover.py @@ -26,9 +26,6 @@ from radicale.log import logger class StorageDiscoverMixin: - def __init__(self, configuration): - super().__init__(configuration) - def discover(self, path, depth="0", child_context_manager=( lambda path, href=None: contextlib.ExitStack())): # Path should already be sanitized diff --git a/radicale/storage/multifilesystem/lock.py b/radicale/storage/multifilesystem/lock.py index df3c76a..e3615e9 100644 --- a/radicale/storage/multifilesystem/lock.py +++ b/radicale/storage/multifilesystem/lock.py @@ -39,6 +39,7 @@ class CollectionLockMixin: class StorageLockMixin: + def __init__(self, configuration): super().__init__(configuration) folder = self.configuration.get("storage", "filesystem_folder") diff --git a/radicale/storage/multifilesystem/move.py b/radicale/storage/multifilesystem/move.py index 4de6518..def8d2e 100644 --- a/radicale/storage/multifilesystem/move.py +++ b/radicale/storage/multifilesystem/move.py @@ -22,8 +22,6 @@ from radicale import pathutils class StorageMoveMixin: - def __init__(self, configuration): - super().__init__(configuration) def move(self, item, to_collection, to_href): if not pathutils.is_safe_filesystem_path_component(to_href): diff --git a/radicale/tests/test_base.py b/radicale/tests/test_base.py index 51dd2e5..b1f33fa 100644 --- a/radicale/tests/test_base.py +++ b/radicale/tests/test_base.py @@ -1487,6 +1487,14 @@ class TestMultiFileSystem(BaseFileSystemTest, BaseRequestsMixIn): """Test BaseRequests on multifilesystem.""" storage_type = "multifilesystem" + def test_folder_creation(self): + """Verify that the folder is created.""" + folder = os.path.join(self.colpath, "subfolder") + self.configuration.update({"storage": {"filesystem_folder": folder}}, + "test") + self.application = Application(self.configuration) + assert os.path.isdir(folder) + def test_fsync(self): """Create a directory and file with syncing enabled.""" self.configuration.update({