mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-18 01:22:38 -05:00
findExecutable(): cleanup log output a bit.
Change-Id: I217bddc91ff9ea43a5cfc018818f5a19b1555dd9
This commit is contained in:
parent
4105c82e6b
commit
7d8db0a6ff
1 changed files with 3 additions and 2 deletions
|
|
@ -272,7 +272,7 @@ QString Utils::findExecutable(QString name)
|
|||
QStringList path = QString(getenv("PATH")).split(";", QString::SkipEmptyParts);
|
||||
#endif
|
||||
qDebug() << "[Utils] system path:" << path;
|
||||
for(int i = 0; i < path.size(); i++)
|
||||
for(int i = 0; i < path.size(); i++)
|
||||
{
|
||||
QString executable = QDir::fromNativeSeparators(path.at(i)) + "/" + name;
|
||||
#if defined(Q_OS_WIN)
|
||||
|
|
@ -280,12 +280,13 @@ QString Utils::findExecutable(QString name)
|
|||
QStringList ex = executable.split("\"", QString::SkipEmptyParts);
|
||||
executable = ex.join("");
|
||||
#endif
|
||||
qDebug() << "[Utils] executable:" << executable;
|
||||
if(QFileInfo(executable).isExecutable())
|
||||
{
|
||||
qDebug() << "[Utils] findExecutable: found" << executable;
|
||||
return QDir::toNativeSeparators(executable);
|
||||
}
|
||||
}
|
||||
qDebug() << "[Utils] findExecutable: could not find" << name;
|
||||
return "";
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue