Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

Commit

Permalink
refactor: write cache files with proper names
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Jun 11, 2022
1 parent 22d2535 commit cf1d512
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/kotlin/app/revanced/cli/command/MainCommand.kt
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ internal object MainCommand : Runnable {
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)

Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/app/revanced/cli/signing/Signing.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import java.io.File
object Signing {
fun start(inputFile: File, outputFile: File, cn: String, password: String) {
val cacheDirectory = File(cacheDirectory)
val alignedOutput = cacheDirectory.resolve("aligned.apk")
val signedOutput = cacheDirectory.resolve("signed.apk")
val alignedOutput = cacheDirectory.resolve("${outputFile.nameWithoutExtension}_aligned.apk")
val signedOutput = cacheDirectory.resolve("${outputFile.nameWithoutExtension}_signed.apk")

// align the inputFile and write to alignedOutput
ZipAligner.align(inputFile, alignedOutput)
Expand Down

0 comments on commit cf1d512

Please sign in to comment.