storage: add and take use of flag _filesystem_root_folder_is_collision_free

This commit is contained in:
Peter Bieringer
2026-04-14 09:00:04 +02:00
parent f6eb5634cd
commit 7a55e8164b
8 changed files with 18 additions and 11 deletions

View File

@@ -32,6 +32,7 @@ class CollectionBase(storage.BaseCollection):
_path: str
_encoding: str
_filesystem_path: str
_filesystem_root_folder_is_collision_free: bool
def __init__(self, storage_: "multifilesystem.Storage", path: str,
filesystem_path: Optional[str] = None) -> None:
@@ -42,8 +43,9 @@ class CollectionBase(storage.BaseCollection):
self._path = pathutils.strip_path(path)
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
if filesystem_path is None:
filesystem_path = pathutils.path_to_filesystem(folder, self.path)
filesystem_path = pathutils.path_to_filesystem(folder, self.path, self._filesystem_root_folder_is_collision_free)
self._filesystem_path = filesystem_path
# TODO: better fix for "mypy"
@@ -79,6 +81,7 @@ class StorageBase(storage.BaseStorage):
_folder_umask: str
_config_umask: int
_max_resource_size: int
_filesystem_root_folder_is_collision_free: bool = False
def __init__(self, configuration: config.Configuration) -> None:
super().__init__(configuration)