Minor cleanup

This commit is contained in:
arkon
2023-04-22 22:29:17 -04:00
parent d62d94f587
commit 67b4e53a58
9 changed files with 14 additions and 14 deletions

View File

@ -290,8 +290,8 @@ actual class LocalSource(
fun getFormat(chapter: SChapter): Format {
try {
return fileSystem.getBaseDirectories()
.map { directory -> File(directory, chapter.url) }
.find { chapterFile -> chapterFile.exists() }
.map { dir -> File(dir, chapter.url) }
.find { it.exists() }
?.let(Format.Companion::valueOf)
?: throw Exception(context.getString(R.string.chapter_not_found))
} catch (e: Format.UnknownFormatException) {