Fix issue when library blend file does not exist

This commit is contained in:
Sybren A. Stüvel 2018-02-28 17:23:43 +01:00
parent 6252b041d5
commit 204626b671

View File

@ -60,8 +60,10 @@ class _Tracer:
# Convert bytes to pathlib.Path object so we have a nice interface to work with. # Convert bytes to pathlib.Path object so we have a nice interface to work with.
# This assumes the path is encoded in UTF-8. # This assumes the path is encoded in UTF-8.
path = pathlib.Path(abspath.decode()).resolve() path = pathlib.Path(abspath.decode())
if not path.exists(): try:
path = path.resolve()
except FileNotFoundError:
log.warning('Linked blend file %s (%s) does not exist; skipping.', relpath, path) log.warning('Linked blend file %s (%s) does not exist; skipping.', relpath, path)
return return