From 48c4ea2f6d9de319383a49ea2d4c6ffb4f687a2b Mon Sep 17 00:00:00 2001 From: Lucaskyy Date: Sat, 9 Apr 2022 00:03:21 +0200 Subject: [PATCH] fix: returning failure on success oh wow, that's an oopsie --- src/main/kotlin/app/revanced/patcher/Patcher.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/app/revanced/patcher/Patcher.kt b/src/main/kotlin/app/revanced/patcher/Patcher.kt index b140ee68..8bb9af64 100644 --- a/src/main/kotlin/app/revanced/patcher/Patcher.kt +++ b/src/main/kotlin/app/revanced/patcher/Patcher.kt @@ -85,7 +85,7 @@ class Patcher( for (patch in patches) { val result: Result = try { val pr = patch.execute(cache) - if (!pr.isSuccess()) { + if (pr.isSuccess()) { Result.success(pr) } else { Result.failure(Exception(pr.error()?.errorMessage() ?: "Unknown error"))