[JS] Optimize resolving paths when building source maps

`File.getCanonicalFile` follows symlinks, that is not necessary.
This commit is contained in:
Sergej Jaskiewicz
2022-05-25 21:26:29 +03:00
committed by Space
parent 375c13cd7e
commit e9db050245
@@ -30,7 +30,7 @@ class SourceFilePathResolver(sourceRoots: List<File>, outputDir: File? = null) {
val pathRelativeToOutput = calculatePathRelativeToOutput(file)
if (pathRelativeToOutput != null) return pathRelativeToOutput
val parts = mutableListOf<String>()
var currentFile: File? = file.canonicalFile
var currentFile: File? = file.absoluteFile.normalize()
while (currentFile != null) {
if (sourceRoots.contains(currentFile)) {
if (parts.isEmpty()) {