mirror of
https://github.com/ReVanced/revanced-cli.git
synced 2026-01-18 08:53:58 +00:00
refactor: prevent any future regressions in zipfs
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user