Fix filesystem folder creation
This commit is contained in:
@ -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(
|
||||
|
@ -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()
|
||||
|
||||
|
@ -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
|
||||
|
@ -39,6 +39,7 @@ class CollectionLockMixin:
|
||||
|
||||
|
||||
class StorageLockMixin:
|
||||
|
||||
def __init__(self, configuration):
|
||||
super().__init__(configuration)
|
||||
folder = self.configuration.get("storage", "filesystem_folder")
|
||||
|
@ -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):
|
||||
|
Reference in New Issue
Block a user