Commit 3d52be5c authored by Aleksander Kuznetsov's avatar Aleksander Kuznetsov Committed by intellij-monorepo-bot
Browse files

[run targets] IDEA-264026: fix profiler/coverage reports downloading from Docker target

adjust JdkCommandLineSetup#requestDownloadFromTarget to meet the new Volume interface -- there is no need to rely on UploadableVolume more

(cherry picked from commit 42f4b95c9084806114ad74e420c137841118e112)

IDEA-CR-70924

GitOrigin-RevId: 844a1f1a1d4c7002ac23d30a21d48236cc8fc956
parent b0de9c3b
Branches unavailable Tags unavailable
No related merge requests found
Showing with 2 additions and 7 deletions
+2 -7
......@@ -32,7 +32,6 @@ import com.intellij.util.io.isDirectory
import com.intellij.util.lang.UrlClassLoader
import gnu.trove.THashMap
import io.netty.bootstrap.com.intellij.execution.configurations.ParameterTargetValuePart
import org.jetbrains.annotations.ApiStatus
import org.jetbrains.annotations.NonNls
import org.jetbrains.concurrency.AsyncPromise
import org.jetbrains.concurrency.Promise
......@@ -111,8 +110,6 @@ class JdkCommandLineSetup(private val request: TargetEnvironmentRequest,
}
@Suppress("SameParameterValue")
@Deprecated("Temporary solution, while real download does not exist")
@ApiStatus.ScheduledForRemoval
private fun requestDownloadFromTarget(downloadPathString: String,
downloadPathIsFile: Boolean? = null): TargetValue<String> {
val downloadPath = Paths.get(FileUtil.toSystemDependentName(downloadPathString))
......@@ -133,10 +130,8 @@ class JdkCommandLineSetup(private val request: TargetEnvironmentRequest,
val volume = environment.downloadVolumes.getValue(downloadRoot)
try {
val relativePath = if (isDir) "." else downloadPath.fileName.toString()
if (volume is TargetEnvironment.UploadableVolume) {
val resolvedTargetPath = volume.resolveTargetPath(relativePath)
result.resolve(resolvedTargetPath)
}
val resolvedTargetPath = volume.resolveTargetPath(relativePath)
result.resolve(resolvedTargetPath)
}
catch (t: Throwable) {
LOG.warn(t)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment