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:
commit
10e394db1e
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