diff --git a/mythtv/libs/libmythbase/mythsystem.cpp b/mythtv/libs/libmythbase/mythsystem.cpp index 382ba2b0d30..6a9a9ead51d 100644 --- a/mythtv/libs/libmythbase/mythsystem.cpp +++ b/mythtv/libs/libmythbase/mythsystem.cpp @@ -63,7 +63,23 @@ MythSystem::MythSystem(const QString &command, uint flags) */ void MythSystem::SetCommand(const QString &command, uint flags) { - SetCommand(command, QStringList(), flags | kMSRunShell); + if (flags & kMSRunShell) + SetCommand(command, QStringList(), flags); + else + { + QString abscommand; + QStringList args; + if (!d->ParseShell(command, abscommand, args)) + { + LOG(VB_GENERAL, LOG_ERR, + QString("MythSystem(%1) command not understood") + .arg(command)); + m_status = GENERIC_EXIT_INVALID_CMDLINE; + return; + } + + SetCommand(abscommand, args, flags); + } }