[FIR] Add path normalization to LibraryPathFilter

This commit is contained in:
Dmitriy Novozhilov
2021-05-12 14:40:42 +03:00
committed by TeamCityServer
parent cf5af0f7ea
commit 43b075d452
2 changed files with 4 additions and 2 deletions
@@ -46,7 +46,9 @@ abstract class LibraryPathFilter {
}
}
class LibraryList(val libs: Set<Path>) : LibraryPathFilter() {
class LibraryList(libs: Set<Path>) : LibraryPathFilter() {
val libs: Set<Path> = libs.mapTo(mutableSetOf()) { it.normalize() }
override fun accepts(path: Path?): Boolean {
if (path == null) return false
return libs.any { path.startsWith(it) }
@@ -169,6 +169,6 @@ class KotlinDeserializedJvmSymbolsProvider(
}
private fun String?.toPath(): Path? {
return this?.let { Paths.get(it) }
return this?.let { Paths.get(it).normalize() }
}
}