From 3c2a4beec97cc22a8944e77c75e435082dee425a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 14 Jan 2015 23:45:32 +1100 Subject: [PATCH] Fix for pack failing with missing files --- bam/blend/blendfile_pack.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bam/blend/blendfile_pack.py b/bam/blend/blendfile_pack.py index 6882081..4851d9e 100755 --- a/bam/blend/blendfile_pack.py +++ b/bam/blend/blendfile_pack.py @@ -387,7 +387,9 @@ def pack( from bam.utils.system import uuid_from_file for src, dst in path_copy_files: - paths_uuid[os.path.relpath(dst, base_dir_dst).decode('utf-8')] = uuid_from_file(src) + # reports are handled again, later on. + if os.path.exists(src): + paths_uuid[os.path.relpath(dst, base_dir_dst).decode('utf-8')] = uuid_from_file(src) # XXX, better way to store temp target blendfile_dst_tmp = temp_remap_cb(blendfile_src, base_dir_src) paths_uuid[os.path.basename(blendfile_src).decode('utf-8')] = uuid_from_file(blendfile_dst_tmp)