Bug fix
This commit is contained in:
parent
83383f71f7
commit
841a07b8d3
@ -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")
|
||||||
|
Loading…
Reference in New Issue
Block a user