change cached file naming pattern

This commit is contained in:
2022-11-03 14:22:19 +01:00
parent 639096b548
commit 8aed76e52a

View File

@@ -196,9 +196,8 @@ class OBS:
def _path_from_md5(self, name, cachedir, md5):
filepath = cachedir / md5[:3]
cached_file = f"{md5[3:]}-{name}"
filepath.mkdir(parents=True, exist_ok=True)
return filepath / cached_file
return filepath / md5[3:]
def in_cache(self, name, cachedir, md5):
return self._path_from_md5(name, cachedir, md5).exists()