aedi: handle symlinks when merging paths

symbolic links are kept unchanged instead of merging files they point to
This commit is contained in:
alexey.lysiuk 2023-03-30 17:09:28 +03:00
parent d7937719ae
commit 37bc39c57f

View file

@ -215,6 +215,10 @@ class Builder(object):
return True
def _merge_file(self, src: Path, src_sub_paths: typing.Sequence[Path], dst_path: Path):
if src.is_symlink():
shutil.copy(src_sub_paths[0], dst_path, follow_symlinks=False)
return
with open(src, 'rb') as f:
header = f.read(8)