From c1edc1e9df1b9d107e64e8da421e253362505e2b Mon Sep 17 00:00:00 2001 From: David Schulz Date: Wed, 16 Nov 2022 13:28:39 +0100 Subject: [PATCH] ProjectExplorer: Fix starting a docker project on windows ... by mapping the executable and working directory to the target device. Change-Id: I0a220fe9bae980cb279fae776962f23335eac248 Reviewed-by: Marcus Tillmanns Reviewed-by: hjk --- src/plugins/projectexplorer/runconfiguration.cpp | 2 +- src/plugins/projectexplorer/runconfigurationaspects.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp index d4e6784dda5..a459148bf2f 100644 --- a/src/plugins/projectexplorer/runconfiguration.cpp +++ b/src/plugins/projectexplorer/runconfiguration.cpp @@ -392,7 +392,7 @@ Runnable RunConfiguration::runnable() const Runnable r; r.command = commandLine(); if (auto workingDirectoryAspect = aspect()) - r.workingDirectory = workingDirectoryAspect->workingDirectory(); + r.workingDirectory = workingDirectoryAspect->workingDirectory().onDevice(r.command.executable()); if (auto environmentAspect = aspect()) r.environment = environmentAspect->environment(); if (m_runnableModifier) diff --git a/src/plugins/projectexplorer/runconfigurationaspects.cpp b/src/plugins/projectexplorer/runconfigurationaspects.cpp index 9c845fd31c0..e21c99e8571 100644 --- a/src/plugins/projectexplorer/runconfigurationaspects.cpp +++ b/src/plugins/projectexplorer/runconfigurationaspects.cpp @@ -621,7 +621,7 @@ FilePath ExecutableAspect::executable() const : m_executable.filePath(); if (const IDevice::ConstPtr dev = executionDevice(m_target, m_selector)) - exe = dev->filePath(exe.path()); + exe = exe.onDevice(dev->rootPath()); return exe; }