From 0d658c08ea1cc97786c80d4645a6e132637cf84f Mon Sep 17 00:00:00 2001 From: Peter Bieringer Date: Wed, 22 Apr 2026 07:29:57 +0200 Subject: [PATCH] storage: expose unicode support, fix typos --- radicale/storage/multifilesystem/__init__.py | 7 ++++--- radicale/storage/multifilesystem/base.py | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/radicale/storage/multifilesystem/__init__.py b/radicale/storage/multifilesystem/__init__.py index 65ea9b81..82bb6cc4 100644 --- a/radicale/storage/multifilesystem/__init__.py +++ b/radicale/storage/multifilesystem/__init__.py @@ -176,13 +176,14 @@ class Storage( filesystem_root_folder_is_collision_free_case_sensitive = pathutils.path_is_collision_free_case_sensitive(self._get_collection_root_folder()) filesystem_root_folder_is_collision_free_no_short_filename = pathutils.path_is_collision_free_no_short_filename(self._get_collection_root_folder()) self._filesystem_root_folder_is_collision_free = filesystem_root_folder_is_collision_free_case_sensitive and filesystem_root_folder_is_collision_free_no_short_filename + self._filesystem_root_folder_supports_unicode = pathutils.path_supports_unicode(self._get_collection_root_folder()) logger.info("Storage location subfolder is collision free: %s (case-sensitive=%s no-short-filename=%s)", self._filesystem_root_folder_is_collision_free, filesystem_root_folder_is_collision_free_case_sensitive, filesystem_root_folder_is_collision_free_no_short_filename) - logger.info("Storage location subfolder suppports unicode: %s", pathutils.path_supports_unicode(self._get_collection_root_folder())) - logger.info("Storage location subfolder suppports trailing whitespace: %s", pathutils.path_supports_trailing_whitespace(self._get_collection_root_folder())) - logger.info("Storage location subfolder suppports problematic chars: %s", pathutils.path_supports_problematic_chars(self._get_collection_root_folder())) + logger.info("Storage location subfolder supports unicode: %s", self._filesystem_root_folder_supports_unicode) + logger.info("Storage location subfolder supports trailing whitespace: %s", pathutils.path_supports_trailing_whitespace(self._get_collection_root_folder())) + logger.info("Storage location subfolder supports problematic chars: %s", pathutils.path_supports_problematic_chars(self._get_collection_root_folder())) logger.info("Storage cache subfolder usage for 'item': %s", self._use_cache_subfolder_for_item) logger.info("Storage cache subfolder usage for 'history': %s", self._use_cache_subfolder_for_history) logger.info("Storage cache subfolder usage for 'sync-token': %s", self._use_cache_subfolder_for_synctoken) diff --git a/radicale/storage/multifilesystem/base.py b/radicale/storage/multifilesystem/base.py index 04ce68a7..515f39d7 100644 --- a/radicale/storage/multifilesystem/base.py +++ b/radicale/storage/multifilesystem/base.py @@ -33,6 +33,7 @@ class CollectionBase(storage.BaseCollection): _encoding: str _filesystem_path: str _filesystem_root_folder_is_collision_free: bool + _filesystem_root_folder_supports_unicode: bool def __init__(self, storage_: "multifilesystem.Storage", path: str, filesystem_path: Optional[str] = None) -> None: @@ -44,6 +45,7 @@ class CollectionBase(storage.BaseCollection): self._encoding = storage_.configuration.get("encoding", "stock") self._skip_broken_item = storage_.configuration.get("storage", "skip_broken_item") self._filesystem_root_folder_is_collision_free = storage_._filesystem_root_folder_is_collision_free + self._filesystem_root_folder_supports_unicode = storage_._filesystem_root_folder_supports_unicode if filesystem_path is None: filesystem_path = pathutils.path_to_filesystem(folder, self.path, self._filesystem_root_folder_is_collision_free) self._filesystem_path = filesystem_path @@ -82,6 +84,7 @@ class StorageBase(storage.BaseStorage): _config_umask: int _max_resource_size: int _filesystem_root_folder_is_collision_free: bool = False + _filesystem_root_folder_supports_unicode: bool = False def __init__(self, configuration: config.Configuration) -> None: super().__init__(configuration)