Skip to content

Commit 3aa6e2f

Browse files
authored
Merge pull request #13179 from romanowski/scaladoc/fix-resources-conflicts-on-windows
Properly detect conflicts on windows
2 parents 6f03643 + 0118634 commit 3aa6e2f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

scaladoc/src/dotty/tools/scaladoc/renderers/Resources.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,9 @@ trait Resources(using ctx: DocContext) extends Locations, Writer:
171171
)
172172

173173
def renderResource(resource: Resource): Seq[String] =
174-
if resource.path.endsWith(".html") && apiPaths.contains(resource.path) then
175-
report.error(s"Conflict between resource and API member for ${resource.path}. $pathsConflictResoultionMsg")
174+
val normalizedPath = resource.path.replace('\\', '/')
175+
if normalizedPath.endsWith(".html") && apiPaths.contains(normalizedPath) then
176+
report.error(s"Conflict between resource and API member for $normalizedPath. $pathsConflictResoultionMsg")
176177
Nil
177178
else
178179
resource match

0 commit comments

Comments
 (0)