Browse Source

ExtensionLoader: Fix incorrect ext file deletion (#10026)

Ref c492efcb31775a65464cf68b4a249bc5bb8e6016
Ivan Iskandar 1 year ago
parent
commit
ea99d77fda

+ 1 - 1
app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionLoader.kt

@@ -98,7 +98,7 @@ internal object ExtensionLoader {
 
         val target = File(getPrivateExtensionDir(context), "${extension.packageName}.$PRIVATE_EXTENSION_EXTENSION")
         return try {
-            file.delete()
+            target.delete()
             file.copyAndSetReadOnlyTo(target, overwrite = true)
             if (currentExtension != null) {
                 ExtensionInstallReceiver.notifyReplaced(context, extension.packageName)