No need to lookup executable PATH when absolute path is given

This commit is contained in:
Jekyll Wu
2012-11-01 11:57:42 +08:00
parent 5d330180dc
commit d12aead588

View File

@@ -379,6 +379,11 @@ QString Session::checkProgram(const QString& program)
if (exec.isEmpty())
return QString();
QFileInfo info(exec);
if (info.isAbsolute() && info.exists() && info.isExecutable()) {
return exec;
}
exec = KRun::binaryName(exec, false);
exec = KShell::tildeExpand(exec);
QString pexec = KStandardDirs::findExe(exec);