We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d75c32d + 9cbbdf7 commit 2704324Copy full SHA for 2704324
compiler/src/dotty/tools/dotc/coverage/Serializer.scala
@@ -31,7 +31,9 @@ object Serializer:
31
def serialize(coverage: Coverage, writer: Writer, sourceRoot: Path): Unit =
32
33
def getRelativePath(filePath: Path): String =
34
- val relPath = sourceRoot.relativize(filePath)
+ // We need to normalize the path here because the relativizing paths containing '.' or '..' differs between Java versions
35
+ // https://bugs.openjdk.java.net/browse/JDK-8066943
36
+ val relPath = sourceRoot.normalize.relativize(filePath)
37
relPath.toString
38
39
def writeHeader(writer: Writer): Unit =
0 commit comments