fix path separator in system() for bootstrapped builds on windows

Change-Id: Ic472eb88f9d253fc182fb5c776560443c810321f
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
Oswald Buddenhagen
2012-08-31 17:56:49 +02:00
parent da62508d78
commit 1ea709889e

View File

@@ -353,7 +353,7 @@ QByteArray QMakeEvaluator::getCommandOutput(const QString &args) const
#else #else
QByteArray out; QByteArray out;
if (FILE *proc = QT_POPEN(QString(QLatin1String("cd ") if (FILE *proc = QT_POPEN(QString(QLatin1String("cd ")
+ IoUtils::shellQuote(currentDirectory()) + IoUtils::shellQuote(QDir::toNativeSeparators(currentDirectory()))
+ QLatin1String(" && ") + args).toLocal8Bit().constData(), "r")) { + QLatin1String(" && ") + args).toLocal8Bit().constData(), "r")) {
while (!feof(proc)) { while (!feof(proc)) {
char buff[10 * 1024]; char buff[10 * 1024];
@@ -1431,7 +1431,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional(
return returnBool(proc.exitStatus() == QProcess::NormalExit && proc.exitCode() == 0); return returnBool(proc.exitStatus() == QProcess::NormalExit && proc.exitCode() == 0);
#else #else
return returnBool(system((QLatin1String("cd ") return returnBool(system((QLatin1String("cd ")
+ IoUtils::shellQuote(currentDirectory()) + IoUtils::shellQuote(QDir::toNativeSeparators(currentDirectory()))
+ QLatin1String(" && ") + args.at(0)).toLocal8Bit().constData()) == 0); + QLatin1String(" && ") + args.at(0)).toLocal8Bit().constData()) == 0);
#endif #endif
} }