From 4abebfddab3ff2a3277ac665bd2814d97e6bc0d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Corentin=20S=C3=A9chet?= Date: Mon, 11 Apr 2022 15:35:22 +0200 Subject: [PATCH] cache: limit file name to 255 characters --- frontools/cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontools/cache.py b/frontools/cache.py index bec534d..befd90c 100644 --- a/frontools/cache.py +++ b/frontools/cache.py @@ -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():