forked from kiss-community/kiss
kiss: skip already seen directories during tar hack
Fixed bug where fcft/fcft becomes fcft. Also improves performance.
This commit is contained in:
parent
6db1ac3bd0
commit
c2216a3388
3
kiss
3
kiss
@ -341,6 +341,9 @@ pkg_extract_tar_hack() {
|
|||||||
# Iterate over all directories in the first level of the
|
# Iterate over all directories in the first level of the
|
||||||
# tarball's manifest.
|
# tarball's manifest.
|
||||||
tar tf "$tmp_dir/ktar" | while IFS=/ read -r dir _; do
|
tar tf "$tmp_dir/ktar" | while IFS=/ read -r dir _; do
|
||||||
|
# Skip the directory if seen before.
|
||||||
|
! contains "$_seen" "$dir" || continue && _seen="$_seen $dir"
|
||||||
|
|
||||||
# Some tarballs contain './' as the top-level directory,
|
# Some tarballs contain './' as the top-level directory,
|
||||||
# we need to skip these occurances.
|
# we need to skip these occurances.
|
||||||
[ -d "${dir#.}" ] || continue
|
[ -d "${dir#.}" ] || continue
|
||||||
|
Loading…
Reference in New Issue
Block a user