From 573f3a392ad2d98f0a6532c8d2ad5a809f575fc8 Mon Sep 17 00:00:00 2001 From: arkon Date: Tue, 12 May 2020 09:18:18 -0400 Subject: [PATCH] Null check for local source cover parent dir --- app/src/main/java/eu/kanade/tachiyomi/source/LocalSource.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/source/LocalSource.kt b/app/src/main/java/eu/kanade/tachiyomi/source/LocalSource.kt index 0f8879a72..b6116c476 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/source/LocalSource.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/source/LocalSource.kt @@ -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)