]> git.ipfire.org Git - thirdparty/tar.git/commit
sparse: fix pax extraction for unicode filenames
authorPavel Raiskup <praiskup@redhat.com>
Thu, 30 Jun 2016 14:17:29 +0000 (16:17 +0200)
committerSergey Poznyakoff <gray@gnu.org.ua>
Fri, 11 Nov 2016 09:18:32 +0000 (11:18 +0200)
commit00f928642f7f7f1e7154a47df9cbf37ae70402ea
tree04b9f5a91981a46f182e518e701d0ea5b1cd6592
parentc81a0853bb8c5c6d78af2e57ceaa393de6cc565b
sparse: fix pax extraction for unicode filenames

Make sure that 'GNU.sparse.name' header has higher priority than
(for sparse-purposes artificially modified) 'path' pax header.

Historically, the 'GNU.sparse.name' header comes before 'path';
this caused that modified 'path' header won and that is not what
we want in sparse "capable" tar implementation.

* src/tar.h (tar_stat_info): New argument sparse_name_done.
* src/xheader.c (raw_path_decoder): Move here the unconditional
code from path_decoder.
(path_decoder): Apply raw_path_decoder only if sparse_path_decoder
was not yet called.
(sparse_path_decoder): New wrapper around raw_path_decoder.
* tests/sparse07.at: New testcase.
* tests/testsuite.at: Mention new testcase.
* tests/Makefile.am: Likewise.
src/tar.h
src/xheader.c
tests/Makefile.am
tests/sparse07.at [new file with mode: 0644]
tests/testsuite.at