From e3a62b2aabf16df598bbef299fdbdff4a609067b Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Mon, 19 Feb 2024 08:32:46 +0100 Subject: [PATCH] Revert "fix(common-utils): Do not extract TAR directory entries as files" This reverts the work-around from commit d0301b4 as the bug has been fixed with a release from upstream. Signed-off-by: Sebastian Schuberth --- utils/common/src/main/kotlin/ArchiveUtils.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/utils/common/src/main/kotlin/ArchiveUtils.kt b/utils/common/src/main/kotlin/ArchiveUtils.kt index 6f7d39d871574..992290439a245 100644 --- a/utils/common/src/main/kotlin/ArchiveUtils.kt +++ b/utils/common/src/main/kotlin/ArchiveUtils.kt @@ -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 } )