DaemonManager: fix issues with spaces in path

This commit is contained in:
Jaquee 2017-03-30 18:19:37 +02:00
parent 4ca35af11a
commit 1e7fbe5cb0
No known key found for this signature in database
GPG key ID: 384E52B09F45DC39

View file

@ -212,15 +212,17 @@ bool DaemonManager::sendCommand(const QString &cmd,bool testnet) const
bool DaemonManager::sendCommand(const QString &cmd,bool testnet, QString &message) const
{
QProcess p;
QString external_cmd = m_monerod + " " + cmd;
qDebug() << "sending external cmd: " << external_cmd;
QStringList external_cmd;
external_cmd << cmd;
// Add testnet flag if needed
if (testnet)
external_cmd += " --testnet";
external_cmd += "\n";
external_cmd << "--testnet";
p.start(external_cmd);
qDebug() << "sending external cmd: " << external_cmd;
p.start(m_monerod, external_cmd);
bool started = p.waitForFinished(-1);
message = p.readAllStandardOutput();