offline manga fix

This commit is contained in:
Finnley Somdahl 2023-12-01 00:58:58 -06:00
parent c7bc1ffe9e
commit f792296f78
6 changed files with 227 additions and 104 deletions

View file

@ -231,6 +231,15 @@ internal class NovelExtensionInstaller(private val context: Context) {
val destination = File(destinationPath)
destination.setWritable(true)
//delete the file if it already exists
if (destination.exists()) {
if (destination.delete()) {
Log.i("File Copy", "File deleted successfully.")
} else {
Log.e("File Copy", "Failed to delete file.")
}
}
var inputChannel: FileChannel? = null
var outputChannel: FileChannel? = null
try {