From 71e6e30dbf9dbeaaeeeec10d8d0887fd8d8ead08 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 19 Oct 2021 14:17:01 +0200 Subject: [PATCH] ProjectExplorer: Fix expansion of variables in working directory ... when actually running the binary. Amends 3dd8831f14. Fixes: QTCREATORBUG-26438 Change-Id: I69fb8df514cb3ab00df76e241a3e367031fce94b Reviewed-by: Eike Ziller --- src/plugins/projectexplorer/runconfigurationaspects.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/projectexplorer/runconfigurationaspects.cpp b/src/plugins/projectexplorer/runconfigurationaspects.cpp index 0a3a2634b0f..2291a86fbda 100644 --- a/src/plugins/projectexplorer/runconfigurationaspects.cpp +++ b/src/plugins/projectexplorer/runconfigurationaspects.cpp @@ -251,7 +251,9 @@ FilePath WorkingDirectoryAspect::workingDirectory() const const Environment env = m_envAspect ? m_envAspect->environment() : Environment::systemEnvironment(); FilePath res = m_workingDirectory; - const QString workingDir = m_workingDirectory.path(); + QString workingDir = m_workingDirectory.path(); + if (m_macroExpander) + workingDir = m_macroExpander->expandProcessArgs(workingDir); res.setPath(PathChooser::expandedDirectory(workingDir, env, QString())); return res; }