From 452db51669f41a41aa1d72bc1a4b12e3d38fa2dd Mon Sep 17 00:00:00 2001 From: Viktor De Pasquale Date: Thu, 11 Jul 2019 15:34:41 +0200 Subject: [PATCH] Updated flash location so it's one layer deeper preventing accidental cache deletion --- app/src/main/java/com/topjohnwu/magisk/tasks/FlashZip.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/topjohnwu/magisk/tasks/FlashZip.kt b/app/src/main/java/com/topjohnwu/magisk/tasks/FlashZip.kt index 0a42d1783..fedf30e87 100644 --- a/app/src/main/java/com/topjohnwu/magisk/tasks/FlashZip.kt +++ b/app/src/main/java/com/topjohnwu/magisk/tasks/FlashZip.kt @@ -21,7 +21,10 @@ abstract class FlashZip( ) { private val app: App by inject() - private val tmpFile: File = File(app.cacheDir, "install.zip") + private val installFolder = File(app.cacheDir, "flash").apply { + if (!exists()) mkdirs() + } + private val tmpFile: File = File(installFolder, "install.zip") @Throws(IOException::class) private fun unzipAndCheck(): Boolean {