Skip to content

Commit

Permalink
Fix usage of plugin in Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
voczi authored and mikehardy committed Jun 27, 2024
1 parent cd49e7f commit 0e5fa76
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,18 @@ internal fun File.classesSequence(): Sequence<Pair<String, File>> {
.filter { it.extension == "class" }
.filterNot { "META-INF" in it.name }
.sortedBy { it.invariantSeparatorsPath }
.map { it.absolutePath.removePrefix(prefix).removePrefix("/") to it }
.map {
// zip specification "4.4.17.1 file name: (Variable)" items:
it.absolutePath
// "The name of the file, with optional relative path.
// The path stored MUST NOT contain a drive or
// device letter, or a leading slash"
.removePrefix(prefix)
.removePrefix(File.separator)
// "All slashes MUST be forward slashes '/' as opposed
// to backwards slashes '\' for compatibility"
.replace(File.separator, "/") to it
}
}

/** Extracts classes from the target [jar] into this archive. */
Expand Down

0 comments on commit 0e5fa76

Please sign in to comment.