Fix for error path remapping with indirectly linked libraries

This commit is contained in:
2014-12-05 14:59:15 +01:00
parent 405973c551
commit dbee95aa96
2 changed files with 10 additions and 6 deletions

View File

@@ -54,7 +54,8 @@ def _relpath_remap(
):
import os
assert(os.path.isabs(path_src))
path_src = os.path.normpath(path_src)
path_dst = os.path.relpath(path_src, base_dir_src)
if blendfile_src_dir_fakeroot is None:
@@ -77,8 +78,10 @@ def _relpath_remap(
path_dst = os.path.normpath(path_dst)
path_dst = b'_' + path_dst
path_dst_final = os.path.join(os.path.relpath(fp_basedir, base_dir_src), path_dst)
# _dbg(b"FINAL A: " + path_dst)
path_dst_final = os.path.join(os.path.relpath(base_dir_src, fp_basedir), path_dst)
path_dst_final = os.path.normpath(path_dst_final)
# _dbg(b"FINAL B: " + path_dst_final)
return path_dst, path_dst_final

View File

@@ -95,10 +95,10 @@ class FPElem:
def filepath_absolute(self):
filepath = self.filepath
if filepath.startswith(b'//'):
return os.path.join(
return os.path.normpath(os.path.join(
self.basedir,
utils.compatpath(filepath[2:]),
)
))
else:
return utils.compatpath(filepath)
@@ -269,7 +269,8 @@ class FilePath:
if block_codes_idlib is not None:
def iter_blocks_idlib():
for block in blend.find_blocks_from_code(b'LI'):
if block[b'name'] in block_codes_idlib:
# TODO, this should work but in fact mades some libs not link correctly.
# if block[b'name'] in block_codes_idlib:
yield from block_expand(block, b'LI')
else:
def iter_blocks_idlib():