Merge pull request #1449 from arittner/buildonwindows

Source generation build fix with backslash file-separator
This commit is contained in:
eikek 2022-03-18 22:38:05 +01:00 committed by GitHub
commit 94722a2cce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -364,7 +364,8 @@ val files = project
val files = (base ** (_.isFile)).pair(sbt.io.Path.relativeTo(base)) val files = (base ** (_.isFile)).pair(sbt.io.Path.relativeTo(base))
val lines = files.toList.map(_._2).map { s => val lines = files.toList.map(_._2).map { s =>
val ident = s.replaceAll("[^a-zA-Z0-9_]+", "_") 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 val content = s"""package docspell.files