1
0
Fork 1
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:
Edward Shen 2021-07-11 16:07:36 -04:00
parent dd8e434024
commit d35d5b386e
No known key found for this signature in database
GPG key ID: 19182661E818369F

View file

@ -366,7 +366,6 @@ class ImageStorage(
private val JACKSON: ObjectMapper = jacksonObjectMapper() private val JACKSON: ObjectMapper = jacksonObjectMapper()
private fun String.toCachePath() = private fun String.toCachePath() =
this.substring(0, 3).replace(".(?!$)".toRegex(), "$0 ").split(" ".toRegex()).reversed() this.substring(0, 3).split("").reversed().drop(1).joinToString(File.separator) + this
.plus(this).joinToString(File.separator)
} }
} }