diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt index 0ca27494d..fd9a69227 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt @@ -315,7 +315,15 @@ class Downloader( * @param download the chapter to be downloaded. */ private suspend fun downloadChapter(download: Download) { - val mangaDir = provider.getMangaDir(download.manga.title, download.source) + val mangaDir: UniFile + try { + mangaDir = provider.getMangaDir(download.manga.title, download.source) + } catch (error: Exception) { + logcat(LogPriority.ERROR, error) + download.status = Download.State.ERROR + notifier.onError(error.message, download.chapter.name, download.manga.title, download.manga.id) + return + } val availSpace = DiskUtil.getAvailableStorageSpace(mangaDir) if (availSpace != -1L && availSpace < MIN_DISK_SPACE) {