diff options
-rw-r--r-- | core/src/main/kotlin/Utilities/Uri.kt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/main/kotlin/Utilities/Uri.kt b/core/src/main/kotlin/Utilities/Uri.kt index 5b520188..9827c624 100644 --- a/core/src/main/kotlin/Utilities/Uri.kt +++ b/core/src/main/kotlin/Utilities/Uri.kt @@ -19,7 +19,7 @@ fun URI.relativeTo(uri: URI): URI { } // Compute common prefix - val commonPartsSize = bParts.zip(cParts).count { (basePart, childPart) -> basePart == childPart } + val commonPartsSize = bParts.zip(cParts).takeWhile { (basePart, childPart) -> basePart == childPart }.count() bParts.drop(commonPartsSize).joinTo(this, separator = "") { "../" } cParts.drop(commonPartsSize).joinTo(this, separator = "/") } |