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.
This commit is contained in:
Pavel Raiskup
2016-06-30 16:17:29 +02:00
committed by Sergey Poznyakoff
parent c81a0853bb
commit 00f928642f
5 changed files with 63 additions and 4 deletions

View File

@@ -387,6 +387,7 @@ m4_include([sparse03.at])
m4_include([sparse04.at])
m4_include([sparse05.at])
m4_include([sparse06.at])
m4_include([sparse07.at])
m4_include([sparsemv.at])
m4_include([spmvp00.at])
m4_include([spmvp01.at])