Source generation build fix with backslash file-separator

This commit is contained in:
Aljoscha Rittner 2022-03-18 16:53:25 +01:00
parent cafd3d7f65
commit a287db7615

View File

@ -364,7 +364,8 @@ val files = project
val files = (base ** (_.isFile)).pair(sbt.io.Path.relativeTo(base))
val lines = files.toList.map(_._2).map { s =>
val ident = s.replaceAll("[^a-zA-Z0-9_]+", "_")
ident -> s"""val $ident = createUrl("$s")"""
val sanitized = s.replace('\\', '/')
ident -> s"""val $ident = createUrl("$sanitized")"""
}
val content = s"""package docspell.files