diff --git a/src/plugins/projectexplorer/abstractprocessstep.cpp b/src/plugins/projectexplorer/abstractprocessstep.cpp index 0bb9ef1b0c4..c1dd6ad92c5 100644 --- a/src/plugins/projectexplorer/abstractprocessstep.cpp +++ b/src/plugins/projectexplorer/abstractprocessstep.cpp @@ -192,8 +192,18 @@ void AbstractProcessStep::run(QFutureInterface &fi) { m_futureInterface = &fi; QDir wd(m_param.effectiveWorkingDirectory()); - if (!wd.exists()) - wd.mkpath(wd.absolutePath()); + if (!wd.exists()) { + if (!wd.mkpath(wd.absolutePath())) { + emit addOutput(tr("Could not create directory \"%1\"") + .arg(QDir::toNativeSeparators(wd.absolutePath())), + BuildStep::ErrorMessageOutput); + fi.reportResult(false); + emit finished(); + return; + } + } + + QString effectiveCommand = m_param.effectiveCommand(); if (!QFileInfo(effectiveCommand).exists()) {