Skip to content

Commit 59dfc98

Browse files
committed
fix: Move file to output even when mounting
1 parent b01fef7 commit 59dfc98

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/kotlin/app/revanced/cli/command/PatchCommand.kt

+3-2
Original file line numberDiff line numberDiff line change
@@ -237,15 +237,15 @@ internal object PatchCommand : Runnable {
237237

238238
// region Save
239239

240-
val tempFile = resourceCachePath.resolve(apk.name).apply {
240+
val alignedFile = resourceCachePath.resolve(apk.name).apply {
241241
ApkUtils.copyAligned(apk, this, patcherResult)
242242
}
243243

244244
val keystoreFilePath = keystoreFilePath ?: outputFilePath.absoluteFile.parentFile
245245
.resolve("${outputFilePath.nameWithoutExtension}.keystore")
246246

247247
if (!mount) ApkUtils.sign(
248-
tempFile,
248+
alignedFile,
249249
outputFilePath,
250250
ApkUtils.SigningOptions(
251251
keystoreFilePath,
@@ -255,6 +255,7 @@ internal object PatchCommand : Runnable {
255255
signer
256256
)
257257
)
258+
else alignedFile.renameTo(outputFilePath)
258259

259260
// endregion
260261

0 commit comments

Comments
 (0)