This commit is contained in:
LoafyLemon 2024-09-10 14:38:51 +01:00
parent 83383f71f7
commit 841a07b8d3

View File

@ -84,9 +84,8 @@ init -1 python:
try:
os.makedirs(syspath, exist_ok=True)
except OSError as e:
print(f"Warning! Failed to create cache directory: {cache_dir} - {e}")
return d
except OSError:
print(f"Warning! Failed to create cache directory: {cache_dir}")
try:
if not renpy.loadable(filepath):
@ -94,7 +93,7 @@ init -1 python:
return Image(filepath)
except Exception as e:
print(f"Warning! Failed to return cached file: {filepath} - {e}")
return d
return d
def get_disk_cache(self, hash, type="img"):
filepath = os.path.join("cache", type, f"{hash}.png")