[Dep downloader] Added support for symlinks in tarballs

This commit is contained in:
Salvador E. Tropea 2022-06-29 11:33:36 -03:00
parent 6611790d40
commit be5c2ff29e
1 changed files with 2 additions and 0 deletions

View File

@ -121,6 +121,8 @@ def untar(data):
elif entry.type == tarfile.REGTYPE:
with open(name, 'wb') as f:
f.write(tar.extractfile(entry).read())
elif entry.type == tarfile.SYMTYPE:
os.symlink(os.path.join(base_dir, entry.linkname), name)
else:
logger.warning('- Unsupported tar element: '+entry.name)
except Exception as e: