Skip to content

Commit

Permalink
Finxing up mingw
Browse files Browse the repository at this point in the history
  • Loading branch information
mpetuska committed Aug 30, 2021
1 parent 0022ed6 commit bb60bf9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/klip-api/src/commonMain/kotlin/int/KlipManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ public object KlipManager {
private val klipMatrix = mutableMapOf<String, Klips>()

private fun loadKlips(path: String) = klipMatrix[path] ?: run {
val klips = read(path)?.replace("\n\r", "\n")?.split(SEPARATOR_KLIPS)?.filter(String::isNotEmpty)?.associate { kl ->
val klips = read(path)?.replace("\r\n", "\n")?.split(SEPARATOR_KLIPS)?.filter(String::isNotEmpty)?.associate { kl ->
val split = kl.split(SEPARATOR_KEY)
require(split.size == 2 && !split[0].startsWith("\n")) {
"Corrupted klip at $path:${split.getOrNull(0)?.substringAfter(SEPARATOR)}"
"Corrupted klip at $path:${split.getOrNull(0)?.substringBefore(SEPARATOR)}"
}
val (k, v) = split
k to v
Expand Down

0 comments on commit bb60bf9

Please sign in to comment.