refactor: write cache files with proper names

This commit is contained in:
oSumAtrIX 2022-06-11 20:02:03 +02:00
parent 22d2535af8
commit cf1d512f4b
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4
2 changed files with 3 additions and 3 deletions

View File

@ -79,7 +79,7 @@ internal object MainCommand : Runnable {
Adb(outputFile, patcher.data.packageMetadata.packageName, deploy!!, install) Adb(outputFile, patcher.data.packageMetadata.packageName, deploy!!, install)
} }
val patchedFile = if (install) File(cacheDirectory).resolve("raw.apk") else outputFile val patchedFile = if (install) File(cacheDirectory).resolve("${outputFile.nameWithoutExtension}_raw.apk") else outputFile
Patcher.start(patcher, patchedFile) Patcher.start(patcher, patchedFile)

View File

@ -8,8 +8,8 @@ import java.io.File
object Signing { object Signing {
fun start(inputFile: File, outputFile: File, cn: String, password: String) { fun start(inputFile: File, outputFile: File, cn: String, password: String) {
val cacheDirectory = File(cacheDirectory) val cacheDirectory = File(cacheDirectory)
val alignedOutput = cacheDirectory.resolve("aligned.apk") val alignedOutput = cacheDirectory.resolve("${outputFile.nameWithoutExtension}_aligned.apk")
val signedOutput = cacheDirectory.resolve("signed.apk") val signedOutput = cacheDirectory.resolve("${outputFile.nameWithoutExtension}_signed.apk")
// align the inputFile and write to alignedOutput // align the inputFile and write to alignedOutput
ZipAligner.align(inputFile, alignedOutput) ZipAligner.align(inputFile, alignedOutput)