forked from qt-creator/qt-creator
WorkingDirectoryAspect: Expand macros first, then expand variables
Expanding variables includes calling cleanPath on the input. At that point macros like %{buildDir} need to be expanded already or working directories like "%{buildDir}/../test" will get turned into "test", which is not what a user expects to happen. Change-Id: I61e6604a621f632ddee87766d38ab3c863bdb9dc Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -218,9 +218,9 @@ FileName WorkingDirectoryAspect::workingDirectory() const
|
||||
auto envAspect = runConfiguration()->extraAspect<EnvironmentAspect>();
|
||||
const Utils::Environment env = envAspect ? envAspect->environment()
|
||||
: Utils::Environment::systemEnvironment();
|
||||
return FileName::fromString(
|
||||
runConfiguration()->macroExpander()->expandProcessArgs(
|
||||
PathChooser::expandedDirectory(m_workingDirectory.toString(), env, QString())));
|
||||
const QString macroExpanded
|
||||
= runConfiguration()->macroExpander()->expandProcessArgs(m_workingDirectory.toUserOutput());
|
||||
return FileName::fromString(PathChooser::expandedDirectory(macroExpanded, env, QString()));
|
||||
}
|
||||
|
||||
FileName WorkingDirectoryAspect::defaultWorkingDirectory() const
|
||||
|
Reference in New Issue
Block a user