summaryrefslogtreecommitdiff
path: root/lorry.gzip-importer
diff options
context:
space:
mode:
authorPedro Alvarez Piedehierro <palvarez89@gmail.com>2018-05-20 18:21:47 +0100
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2018-05-21 10:59:29 +0100
commit6f10fecc49e05d8ad3f2997ac0f788d3fdff51a6 (patch)
tree0d1865dc126ea3ff9eedf14d7231f5a49983ffa4 /lorry.gzip-importer
parent4f932750dd0c72d47295795bb8d405fc90be5ab0 (diff)
downloadlorry-pedro/fix-gcc-tar-import.tar.gz
lorry.tar-importer: Improve support for PAX extended headerspedro/fix-gcc-tar-import
Sometimes the tar files will contain PAX extended headers to deal with cases where the information needed doesn't fit initial header. One of these cases is when the path is larger than 100 characters. An extended header will appear before the block including the contents of this file, including information about the entire path. The PAX extended headers contain one or multiple records constructed as follows: "%d %s=%s\n", <length>, <keyword>, <value> This commit makes sure that we always read the extended header blocks, and in the case of finding one, we parse its records looking for 'path' information. If this information is found, is stored for the next iteration. As a side effect, this commit also fixes a bug where we weren't ignoring the extended header contents because the truncated path was ending on '/' and the script was skipping any actions given that it thought that it was a folder (and it wasn't).
Diffstat (limited to 'lorry.gzip-importer')
0 files changed, 0 insertions, 0 deletions