Browse Source

Don't crash when a texture is on a disconnected HDD.

pull/172/head
Adam Johnson 5 years ago
parent
commit
6063bf6f2a
Signed by: Hoikas
GPG Key ID: 0B6515D6FF6F271E
  1. 7
      korman/exporter/image.py

7
korman/exporter/image.py

@ -143,7 +143,12 @@ class ImageCache:
# the string "//". There isn't much we can do with that, unless the user
# happens to have an unpacked copy lying around somewheres...
path = Path(bl_image.filepath_from_user())
if path.is_file():
try:
exists = path.is_file()
except OSError:
exists = False
finally:
if exists:
cached_image.modify_time = path.stat().st_mtime
if cached_image.export_time and cached_image.export_time < cached_image.modify_time:
return None

Loading…
Cancel
Save