mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
fix: Don't assume download dir is not null
This commit is contained in:
parent
c7076102c9
commit
7daa7cb7c9
1 changed files with 1 additions and 1 deletions
|
@ -126,7 +126,7 @@ class DownloadCache(
|
|||
private fun renew() {
|
||||
val onlineSources = sourceManager.getOnlineSources()
|
||||
|
||||
val sourceDirs = storageManager.getDownloadsDirectory()!!.listFiles().orEmpty()
|
||||
val sourceDirs = storageManager.getDownloadsDirectory()?.listFiles().orEmpty()
|
||||
.associate { it.name to SourceDirectory(it) }.mapNotNullKeys { entry ->
|
||||
onlineSources.find { provider.getSourceDirName(it).equals(entry.key, ignoreCase = true) }?.id
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue