Null check for local source cover parent dir

(cherry picked from commit 573f3a392ad2d98f0a6532c8d2ad5a809f575fc8)
This commit is contained in:
arkon 2020-05-12 09:18:18 -04:00 committed by Jobobby04
parent 4122af491c
commit a8a22b5803

View File

@ -45,7 +45,7 @@ class LocalSource(private val context: Context) : CatalogueSource {
val cover = File("${dir.absolutePath}/${manga.url}", COVER_NAME)
// It might not exist if using the external SD card
cover.parentFile.mkdirs()
cover.parentFile?.mkdirs()
input.use {
cover.outputStream().use {
input.copyTo(it)