Log exception on invalid download directory issue

(cherry picked from commit 1365d553a4f1ac754f2dbc5df1de2dd287b425de)
This commit is contained in:
arkon 2020-12-26 18:05:39 -05:00 committed by Jobobby04
parent 8e659f3355
commit 4be204e0b1

View File

@ -14,6 +14,7 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach
import timber.log.Timber
import uy.kohesive.injekt.injectLazy
/**
@ -55,6 +56,7 @@ class DownloadProvider(private val context: Context) {
.createDirectory(getSourceDirName(source))
.createDirectory(getMangaDirName(manga))
} catch (e: NullPointerException) {
Timber.w(e)
throw Exception(context.getString(R.string.invalid_download_dir))
}
}