build script: do not create symlink to symlink, copy it instead

This commit is contained in:
alexey.lysiuk 2020-12-10 13:32:09 +02:00
parent 32747133a3
commit 6a93fec20d

View file

@ -1164,7 +1164,10 @@ class Builder(object):
os.makedirs(dst_subpath, exist_ok=True)
Builder.symlink_directory(entry.path, dst_subpath, cleanup=False)
elif not os.path.exists(dst_subpath):
os.symlink(entry.path, dst_subpath)
if os.path.islink(entry.path):
shutil.copy(entry.path, dst_subpath, follow_symlinks=False)
else:
os.symlink(entry.path, dst_subpath)
def _detect_target(self):
for name, target in self.targets.items():