diff --git a/platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/UpdateInstaller.kt b/platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/UpdateInstaller.kt index 70105c7ae038..55bdf8bfa1a2 100644 --- a/platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/UpdateInstaller.kt +++ b/platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/UpdateInstaller.kt @@ -156,8 +156,10 @@ object UpdateInstaller { val jnaCopy = jna.copyTo(File(tempDir, jna.name), true) val jnaUtilsCopy = jnaUtils.copyTo(File(tempDir, jnaUtils.name), true) + val homePath = Paths.get(PathManager.getHomePath()) + val path = if (Files.isSymbolicLink(homePath)) Files.readSymbolicLink(homePath).toString() else PathManager.getHomePath() var java = System.getProperty("java.home") - if (FileUtil.isAncestor(PathManager.getHomePath(), java, true)) { + if (FileUtil.isAncestor(path, java, true)) { val javaCopy = File(tempDir, "jre") if (javaCopy.exists()) FileUtil.delete(javaCopy) FileUtil.copyDir(File(java), javaCopy)