mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-06-26 02:50:58 +00:00
fix file handling in DictionaryGroup (again)
This commit is contained in:
parent
b903e10b12
commit
424df5fb0d
1 changed files with 2 additions and 2 deletions
|
@ -729,12 +729,12 @@ private class DictionaryGroup(
|
|||
else {
|
||||
val file = File(context.filesDir.absolutePath + File.separator + "blacklists" + File.separator + locale.toLanguageTag() + ".txt")
|
||||
if (file.isDirectory) file.delete() // this apparently was an issue in some versions
|
||||
if (file.mkdirs()) file
|
||||
if (file.parentFile?.mkdirs() == true) file
|
||||
else null
|
||||
}
|
||||
|
||||
private val blacklist = hashSetOf<String>().apply {
|
||||
if (blacklistFile?.exists() != true) return@apply
|
||||
if (blacklistFile?.isFile != true) return@apply
|
||||
scope.launch {
|
||||
synchronized(this) {
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue