From 3620f4f79e0d73a71940b5ec24ed58efc3959040 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Corentin=20S=C3=A9chet?= Date: Mon, 11 Apr 2022 14:01:29 +0200 Subject: [PATCH] cache: avoid directory / file name collision --- frontools/cache.py | 1 + 1 file changed, 1 insertion(+) diff --git a/frontools/cache.py b/frontools/cache.py index 3b25d87..bec534d 100644 --- a/frontools/cache.py +++ b/frontools/cache.py @@ -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():