File tree 1 file changed +19
-17
lines changed
src/main/kotlin/app/revanced/cli/command
1 file changed +19
-17
lines changed Original file line number Diff line number Diff line change @@ -262,12 +262,13 @@ internal object PatchCommand : Runnable {
262
262
}
263
263
264
264
// endregion
265
+ val patcherTemporaryFilesPath = temporaryFilesPath.resolve(" patcher" )
265
266
val (packageName, patcherResult) = Patcher (
266
267
PatcherConfig (
267
268
apk,
268
- temporaryFilesPath ,
269
+ patcherTemporaryFilesPath ,
269
270
aaptBinaryPath?.path,
270
- temporaryFilesPath .absolutePath,
271
+ patcherTemporaryFilesPath .absolutePath,
271
272
true ,
272
273
),
273
274
).use { patcher ->
@@ -304,21 +305,22 @@ internal object PatchCommand : Runnable {
304
305
}
305
306
306
307
// region Save
307
-
308
- apk.copyTo(outputFilePath, overwrite = true )
309
-
310
- patcherResult.applyTo(outputFilePath)
311
-
312
- if (! mount) {
313
- outputFilePath.sign(
314
- ApkUtils .SigningOptions (
315
- keystoreFilePath,
316
- keyStorePassword,
317
- alias,
318
- password,
319
- signer,
320
- ),
321
- )
308
+ apk.copyTo(temporaryFilesPath.resolve(apk.name), overwrite = true ).apply {
309
+ patcherResult.applyTo(this )
310
+ }.let {
311
+ if (! mount) {
312
+ sign(
313
+ it,
314
+ outputFilePath,
315
+ ApkUtils .SigningOptions (
316
+ keystoreFilePath,
317
+ keyStorePassword,
318
+ alias,
319
+ password,
320
+ signer,
321
+ ),
322
+ )
323
+ }
322
324
}
323
325
324
326
logger.info(" Saved to $outputFilePath " )
You can’t perform that action at this time.
0 commit comments