cache: avoid directory / file name collision

This commit is contained in:
Corentin Sechet 2022-04-11 14:01:29 +02:00
parent bb5b21d145
commit 3620f4f79e
1 changed files with 1 additions and 0 deletions

View File

@ -100,6 +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_directory = file_path.parent
if not file_directory.is_dir():