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; }