cache: limit file name to 255 characters

This commit is contained in:
Corentin Sechet 2022-04-11 15:35:22 +02:00
parent 554d9b0d09
commit 4abebfddab
1 changed files with 1 additions and 1 deletions

View File

@ -100,7 +100,7 @@ class FileCache(Cache[ResourceType]):
key_slug = _get_key_slug(key)
cache_directory = self.cache_base / self._name
file_path = cache_directory.joinpath(*key_slug.split("&"))
file_path = file_path.parent / (file_path.name + '_')
file_path = file_path.parent / (file_path.name[:255] + '_')
file_directory = file_path.parent
if not file_directory.is_dir():