Skip to content

Commit

Permalink
Fix mixin index.d.ts on Windows
Browse files Browse the repository at this point in the history
Paths inside zip-files are unix-style, so we should not compare with Windows-style paths there.

Closes: #71
  • Loading branch information
tajakobsen committed Sep 26, 2024
1 parent 0f6ff09 commit 7658788
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/kotlin/no/item/xp/plugin/GenerateCodeTask.kt
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ open class GenerateCodeTask

val filesInJar =
xmlFilesInJars
.filter { it.entry.name.contains(concatFileName("site", componentTypeName)) }
// ZipEntry.name has UNIX style path. See 4.4.17.1 of the zip file spec.
.filter { it.entry.name.contains("site/$componentTypeName") }
.map { File(it.entry.name).nameWithoutExtension }

val files = (xmlFiles + filesInJar).sorted().distinct()
Expand Down

0 comments on commit 7658788

Please sign in to comment.