From e9db050245ec669a63a1865e094c850d80e2b418 Mon Sep 17 00:00:00 2001 From: Sergej Jaskiewicz Date: Wed, 25 May 2022 21:26:29 +0300 Subject: [PATCH] [JS] Optimize resolving paths when building source maps `File.getCanonicalFile` follows symlinks, that is not necessary. --- .../org/jetbrains/kotlin/js/sourceMap/SourceFilePathResolver.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/js.sourcemap/src/org/jetbrains/kotlin/js/sourceMap/SourceFilePathResolver.kt b/js/js.sourcemap/src/org/jetbrains/kotlin/js/sourceMap/SourceFilePathResolver.kt index 009fbbab1be..88b2d3b3d94 100644 --- a/js/js.sourcemap/src/org/jetbrains/kotlin/js/sourceMap/SourceFilePathResolver.kt +++ b/js/js.sourcemap/src/org/jetbrains/kotlin/js/sourceMap/SourceFilePathResolver.kt @@ -30,7 +30,7 @@ class SourceFilePathResolver(sourceRoots: List, outputDir: File? = null) { val pathRelativeToOutput = calculatePathRelativeToOutput(file) if (pathRelativeToOutput != null) return pathRelativeToOutput val parts = mutableListOf() - var currentFile: File? = file.canonicalFile + var currentFile: File? = file.absoluteFile.normalize() while (currentFile != null) { if (sourceRoots.contains(currentFile)) { if (parts.isEmpty()) {