From 0118634ca0de84b1be8ef8280c2bee76df879b7d Mon Sep 17 00:00:00 2001 From: Krzysztof Romanowski Date: Wed, 28 Jul 2021 11:29:41 +0200 Subject: [PATCH] Properly detect conflicts on windows [test_windows_full] --- scaladoc/src/dotty/tools/scaladoc/renderers/Resources.scala | 5 +++-- .../scaladoc/{RaportingTest.scala => ReportingTest.scala} | 0 2 files changed, 3 insertions(+), 2 deletions(-) rename scaladoc/test/dotty/tools/scaladoc/{RaportingTest.scala => ReportingTest.scala} (100%) diff --git a/scaladoc/src/dotty/tools/scaladoc/renderers/Resources.scala b/scaladoc/src/dotty/tools/scaladoc/renderers/Resources.scala index fdc29d836880..60d3a8b459ca 100644 --- a/scaladoc/src/dotty/tools/scaladoc/renderers/Resources.scala +++ b/scaladoc/src/dotty/tools/scaladoc/renderers/Resources.scala @@ -171,8 +171,9 @@ trait Resources(using ctx: DocContext) extends Locations, Writer: ) def renderResource(resource: Resource): Seq[String] = - if resource.path.endsWith(".html") && apiPaths.contains(resource.path) then - report.error(s"Conflict between resource and API member for ${resource.path}. $pathsConflictResoultionMsg") + val normalizedPath = resource.path.replace('\\', '/') + if normalizedPath.endsWith(".html") && apiPaths.contains(normalizedPath) then + report.error(s"Conflict between resource and API member for $normalizedPath. $pathsConflictResoultionMsg") Nil else resource match diff --git a/scaladoc/test/dotty/tools/scaladoc/RaportingTest.scala b/scaladoc/test/dotty/tools/scaladoc/ReportingTest.scala similarity index 100% rename from scaladoc/test/dotty/tools/scaladoc/RaportingTest.scala rename to scaladoc/test/dotty/tools/scaladoc/ReportingTest.scala