1
0
Fork 1
mirror of https://gitlab.com/mangadex-pub/mangadex_at_home.git synced 2024-01-19 02:48:37 +00:00

Merge branch 'better-cache-path' into 'master'

Remove regex use in cache path generation

See merge request mangadex-pub/mangadex_at_home!91
This commit is contained in:
carbotaniuman 2021-07-11 20:36:39 +00:00
commit 10e394db1e

View file

@ -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
}
}