Fix for error path remapping with indirectly linked libraries
This commit is contained in:
@@ -54,7 +54,8 @@ def _relpath_remap(
|
|||||||
):
|
):
|
||||||
|
|
||||||
import os
|
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)
|
path_dst = os.path.relpath(path_src, base_dir_src)
|
||||||
|
|
||||||
if blendfile_src_dir_fakeroot is None:
|
if blendfile_src_dir_fakeroot is None:
|
||||||
@@ -77,8 +78,10 @@ def _relpath_remap(
|
|||||||
path_dst = os.path.normpath(path_dst)
|
path_dst = os.path.normpath(path_dst)
|
||||||
path_dst = b'_' + 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)
|
path_dst_final = os.path.normpath(path_dst_final)
|
||||||
|
# _dbg(b"FINAL B: " + path_dst_final)
|
||||||
|
|
||||||
return path_dst, path_dst_final
|
return path_dst, path_dst_final
|
||||||
|
|
||||||
|
@@ -95,10 +95,10 @@ class FPElem:
|
|||||||
def filepath_absolute(self):
|
def filepath_absolute(self):
|
||||||
filepath = self.filepath
|
filepath = self.filepath
|
||||||
if filepath.startswith(b'//'):
|
if filepath.startswith(b'//'):
|
||||||
return os.path.join(
|
return os.path.normpath(os.path.join(
|
||||||
self.basedir,
|
self.basedir,
|
||||||
utils.compatpath(filepath[2:]),
|
utils.compatpath(filepath[2:]),
|
||||||
)
|
))
|
||||||
else:
|
else:
|
||||||
return utils.compatpath(filepath)
|
return utils.compatpath(filepath)
|
||||||
|
|
||||||
@@ -269,8 +269,9 @@ class FilePath:
|
|||||||
if block_codes_idlib is not None:
|
if block_codes_idlib is not None:
|
||||||
def iter_blocks_idlib():
|
def iter_blocks_idlib():
|
||||||
for block in blend.find_blocks_from_code(b'LI'):
|
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.
|
||||||
yield from block_expand(block, b'LI')
|
# if block[b'name'] in block_codes_idlib:
|
||||||
|
yield from block_expand(block, b'LI')
|
||||||
else:
|
else:
|
||||||
def iter_blocks_idlib():
|
def iter_blocks_idlib():
|
||||||
return blend.find_blocks_from_code(b'LI')
|
return blend.find_blocks_from_code(b'LI')
|
||||||
|
Reference in New Issue
Block a user