diff --git a/src/main/kotlin/app/revanced/utils/filesystem/ZipFileSystemUtils.kt b/src/main/kotlin/app/revanced/utils/filesystem/ZipFileSystemUtils.kt index d8333cf..95cafc5 100644 --- a/src/main/kotlin/app/revanced/utils/filesystem/ZipFileSystemUtils.kt +++ b/src/main/kotlin/app/revanced/utils/filesystem/ZipFileSystemUtils.kt @@ -13,6 +13,10 @@ internal class ZipFileSystemUtils( private var zipFileSystem = FileSystems.newFileSystem(file.toPath(), mapOf("noCompression" to true)) private fun Path.deleteRecursively() { + if (!Files.exists(this)) { + throw IllegalStateException("File exists in real folder but not in zip file system") + } + if (Files.isDirectory(this)) { Files.list(this).forEach { path -> path.deleteRecursively()