Skip to content

Commit

Permalink
Fix RunProcessAsAdmin not quoting arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
baldurk committed Mar 6, 2018
1 parent 14d9ec4 commit 8a0f4a3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion qrenderdoc/Code/QRDUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1310,7 +1310,14 @@ bool RunProcessAsAdmin(const QString &fullExecutablePath, const QStringList &par
#if defined(Q_OS_WIN32)

std::wstring wideExe = QDir::toNativeSeparators(fullExecutablePath).toStdWString();
std::wstring wideParams = params.join(QLatin1Char(' ')).toStdWString();
std::wstring wideParams;

for(QString p : params)
{
wideParams += L"\"";
wideParams += p.toStdWString();
wideParams += L"\" ";
}

SHELLEXECUTEINFOW info = {};
info.cbSize = sizeof(info);
Expand Down

0 comments on commit 8a0f4a3

Please sign in to comment.