Merge pull request #646

1e7fbe5 DaemonManager: fix issues with spaces in path (Jaquee)
This commit is contained in:
Riccardo Spagni 2017-04-24 11:21:24 +02:00
commit 5a0adb18d3
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD

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();