Don't call File.getCanonicalPath in KGP
Relates to KT-54579.
This commit is contained in:
@@ -23,7 +23,7 @@ abstract class ICReporterBase(private val pathsBase: File? = null) : ICReporter
|
||||
}
|
||||
|
||||
protected fun relativizeIfPossible(files: Iterable<File>): List<File> =
|
||||
files.map { it.relativeOrCanonical() }
|
||||
files.map { it.relativeOrAbsolute() }
|
||||
|
||||
protected fun pathsAsString(files: Iterable<File>): String =
|
||||
relativizeIfPossible(files).map { it.path }.sorted().joinToString()
|
||||
@@ -31,6 +31,6 @@ abstract class ICReporterBase(private val pathsBase: File? = null) : ICReporter
|
||||
protected fun pathsAsString(vararg files: File): String =
|
||||
pathsAsString(files.toList())
|
||||
|
||||
protected fun File.relativeOrCanonical(): File =
|
||||
pathsBase?.let { relativeToOrNull(it) } ?: canonicalFile
|
||||
protected fun File.relativeOrAbsolute(): File =
|
||||
pathsBase?.let { relativeToOrNull(it) } ?: normalize().absoluteFile
|
||||
}
|
||||
@@ -104,7 +104,7 @@ open class IncrementalJvmCache(
|
||||
className in multifileFacadeToParts
|
||||
|
||||
override fun getClassFilePath(internalClassName: String): String {
|
||||
return toSystemIndependentName(File(outputDir, "$internalClassName.class").canonicalPath)
|
||||
return toSystemIndependentName(File(outputDir, "$internalClassName.class").normalize().absolutePath)
|
||||
}
|
||||
|
||||
fun saveModuleMappingToCache(sourceFiles: Collection<File>, file: File) {
|
||||
|
||||
Reference in New Issue
Block a user