mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[eel] IJPL-172897: remove EelPath.OS, use only EelPlatform in the API
GitOrigin-RevId: 1a1b676865f759f4dbabc97165b62c77decb5087
This commit is contained in:
committed by
intellij-monorepo-bot
parent
566c7c026a
commit
c92d860f76
+4
-5
@@ -1,8 +1,7 @@
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.python.community.services.internal.impl
|
||||
|
||||
import com.intellij.platform.eel.fs.pathOs
|
||||
import com.intellij.platform.eel.path.EelPath
|
||||
import com.intellij.platform.eel.EelPlatform
|
||||
import com.intellij.platform.eel.provider.asNioPath
|
||||
import com.intellij.platform.eel.provider.getEelDescriptor
|
||||
import com.intellij.python.community.services.internal.impl.PythonWithLanguageLevelImpl.Companion.concurrentLimit
|
||||
@@ -72,9 +71,9 @@ class PythonWithLanguageLevelImpl internal constructor(
|
||||
override suspend fun getReadableName(): @Nls String {
|
||||
val eelApi = pythonBinary.getEelDescriptor().upgrade()
|
||||
val home = eelApi.userInfo.home.asNioPath()
|
||||
val separator = when (eelApi.fs.pathOs) {
|
||||
EelPath.OS.WINDOWS -> "\\"
|
||||
EelPath.OS.UNIX -> "/"
|
||||
val separator = when (eelApi.platform) {
|
||||
is EelPlatform.Windows -> "\\"
|
||||
is EelPlatform.Posix -> "/"
|
||||
}
|
||||
val pythonString = (if (pythonBinary.startsWith(home)) "~$separator" + pythonBinary.relativeTo(home).pathString
|
||||
else pythonBinary.pathString)
|
||||
|
||||
Reference in New Issue
Block a user