storage: expose unicode support, fix typos

This commit is contained in:
Peter Bieringer
2026-04-22 07:29:57 +02:00
parent 873e48f518
commit 0d658c08ea
2 changed files with 7 additions and 3 deletions

View File

@@ -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)

View File

@@ -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)