diff options
author | Valentin David <valentin.david@gmail.com> | 2017-11-25 13:19:51 +0100 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-11-29 15:32:51 +0000 |
commit | 078b5de4ba30ce1af9b40ff0cdbbc7ea92237321 (patch) | |
tree | 9bf9817208adcb004580fbc358d146622222e858 | |
parent | 546e7b3c45eadf91be82be97b39251afc6f276fb (diff) | |
download | buildstream-078b5de4ba30ce1af9b40ff0cdbbc7ea92237321.tar.gz |
Fix untar of symlinks. Only hardlinks are relative to top of archive and should be normalized.
-rw-r--r-- | buildstream/plugins/sources/tar.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/buildstream/plugins/sources/tar.py b/buildstream/plugins/sources/tar.py index a93183ab0..385f96c0e 100644 --- a/buildstream/plugins/sources/tar.py +++ b/buildstream/plugins/sources/tar.py @@ -104,9 +104,7 @@ class TarSource(DownloadableFileSource): # consider links which point outside of the chosen # base directory. # - if member.linkname: - if member.linkname.startswith('./'): - member.linkname = member.linkname[2:] + if member.type == tarfile.LNKTYPE: member.linkname = member.linkname[l:] member.path = member.path[l:] |