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