fix: Move file to output even when mounting

This commit is contained in:
oSumAtrIX 2023-10-10 10:09:04 +02:00
parent b01fef730a
commit 59dfc988e3
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -237,7 +237,7 @@ internal object PatchCommand : Runnable {
// region Save // region Save
val tempFile = resourceCachePath.resolve(apk.name).apply { val alignedFile = resourceCachePath.resolve(apk.name).apply {
ApkUtils.copyAligned(apk, this, patcherResult) ApkUtils.copyAligned(apk, this, patcherResult)
} }
@ -245,7 +245,7 @@ internal object PatchCommand : Runnable {
.resolve("${outputFilePath.nameWithoutExtension}.keystore") .resolve("${outputFilePath.nameWithoutExtension}.keystore")
if (!mount) ApkUtils.sign( if (!mount) ApkUtils.sign(
tempFile, alignedFile,
outputFilePath, outputFilePath,
ApkUtils.SigningOptions( ApkUtils.SigningOptions(
keystoreFilePath, keystoreFilePath,
@ -255,6 +255,7 @@ internal object PatchCommand : Runnable {
signer signer
) )
) )
else alignedFile.renameTo(outputFilePath)
// endregion // endregion