fix(source/local): Don't use double-bang

This commit is contained in:
Ahmad Ansori Palembani 2024-12-20 08:37:00 +07:00
parent 2299aaac63
commit c1cb7a2066
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6

View file

@ -286,8 +286,9 @@ class LocalSource(private val context: Context) : CatalogueSource, UnmeteredSour
if (!directory.exists()) return
lang?.let { langMap[manga.url] = it }
val file = directory.createFile(COMIC_INFO_FILE)!!
file.writeText(xml.encodeToString(ComicInfo.serializer(), manga.toComicInfo(lang = lang)))
directory.createFile(COMIC_INFO_FILE)?.let { file ->
file.writeText(xml.encodeToString(ComicInfo.serializer(), manga.toComicInfo(lang = lang)))
}
}
@Serializable