Skip to content

Commit

Permalink
Revert "fix(common-utils): Do not extract TAR directory entries as fi…
Browse files Browse the repository at this point in the history
…les"

This reverts the work-around from commit d0301b4 as the bug has been
fixed with a release from upstream.

Signed-off-by: Sebastian Schuberth <[email protected]>
  • Loading branch information
sschuberth committed Feb 19, 2024
1 parent 659b302 commit 1ea5f37
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions utils/common/src/main/kotlin/ArchiveUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,7 @@ fun InputStream.unpackZip(targetDirectory: File) =
fun InputStream.unpackTar(targetDirectory: File, filter: (ArchiveEntry) -> Boolean = { true }) =
TarArchiveInputStream(this).unpack(
targetDirectory,
{ entry ->
(entry as TarArchiveEntry).isDirectory || !entry.isFile || File(entry.name).isAbsolute || !filter(entry)
},
{ entry -> !(entry as TarArchiveEntry).isFile || File(entry.name).isAbsolute || !filter(entry) },
{ entry -> (entry as TarArchiveEntry).mode }
)

Expand Down

0 comments on commit 1ea5f37

Please sign in to comment.