Correctly report when excutable is not found.

This commit is contained in:
Andrius Štikonas 2018-04-16 11:06:13 +03:00
parent 5814c6c02a
commit 99c14ad074
1 changed files with 2 additions and 0 deletions

View File

@ -564,6 +564,8 @@ bool FileSystem::findExternal(const QString& cmdName, const QStringList& args, i
QString cmdFullPath = QStandardPaths::findExecutable(cmdName);
if (cmdFullPath.isEmpty())
cmdFullPath = QStandardPaths::findExecutable(cmdName, { QStringLiteral("/sbin/"), QStringLiteral("/usr/sbin/"), QStringLiteral("/usr/local/sbin/") });
if (cmdFullPath.isEmpty())
return false;
ExternalCommand cmd(cmdFullPath, args);
if (!cmd.run())