mirror of
https://gitlab.com/mangadex-pub/mangadex_at_home.git
synced 2024-01-19 02:48:37 +00:00
Remove regex use in cache path generation
This commit is contained in:
parent
dd8e434024
commit
d35d5b386e
3
src/main/kotlin/mdnet/cache/ImageStorage.kt
vendored
3
src/main/kotlin/mdnet/cache/ImageStorage.kt
vendored
|
@ -366,7 +366,6 @@ class ImageStorage(
|
|||
private val JACKSON: ObjectMapper = jacksonObjectMapper()
|
||||
|
||||
private fun String.toCachePath() =
|
||||
this.substring(0, 3).replace(".(?!$)".toRegex(), "$0 ").split(" ".toRegex()).reversed()
|
||||
.plus(this).joinToString(File.separator)
|
||||
this.substring(0, 3).split("").reversed().drop(1).joinToString(File.separator) + this
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue