From e3259f39f18c44d40e2e845511a8680babce3fff Mon Sep 17 00:00:00 2001 From: inorichi Date: Wed, 8 Nov 2017 22:34:56 +0100 Subject: [PATCH] Fallback covers' external directory --- app/src/main/java/eu/kanade/tachiyomi/data/cache/CoverCache.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/cache/CoverCache.kt b/app/src/main/java/eu/kanade/tachiyomi/data/cache/CoverCache.kt index dee208e0c..4586f8c18 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/cache/CoverCache.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/cache/CoverCache.kt @@ -20,7 +20,8 @@ class CoverCache(private val context: Context) { /** * Cache directory used for cache management. */ - private val cacheDir = context.getExternalFilesDir("covers") + private val cacheDir = context.getExternalFilesDir("covers") ?: + File(context.filesDir, "covers").also { it.mkdirs() } /** * Returns the cover from cache.