tar: skip leading / and handle names like abc/..////def -> def (not ///def)

function                                             old     new   delta
strip_unsafe_prefix                                    -     105    +105
writeFileToTarball                                   557     520     -37
get_header_tar                                      1545    1462     -83

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2011-03-02 01:21:02 +01:00
parent ea6116ee59
commit b80acf58f1
4 changed files with 59 additions and 59 deletions

View File

@@ -178,7 +178,7 @@ rm -rf input_* 2>/dev/null
tar -vxf test.tar 2>&1
cat input_dir/file 2>&1
" "\
tar: removing leading './../tar.tempdir/input_dir/../'
tar: removing leading './../tar.tempdir/input_dir/../' from member names
input_dir/
input_dir/file
Ok