Null check for local source cover parent dir

This commit is contained in:
arkon 2020-05-12 09:18:18 -04:00
parent 830a834ea6
commit 573f3a392a

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)