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 <eike.ziller@qt.io>
This commit is contained in:
Christian Kandeler
2021-10-19 14:17:01 +02:00
parent 575ca89b3e
commit 71e6e30dbf

View File

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