skiped checking whether the php exec function is enabled when searching for binary path;fixed typo;

This commit is contained in:
huangjx
2021-10-01 19:56:25 +08:00
parent ac2f314119
commit e04181dbee
2 changed files with 4 additions and 6 deletions

View File

@@ -202,11 +202,9 @@ class Helper
$dataPath = \OC::$server->getSystemConfig()->getValue('datadirectory');
$paths = ['/usr/local/sbin', '/usr/local/bin', '/usr/sbin', '/usr/bin', '/sbin', '/bin', '/opt/bin', $dataPath . "/bin"];
$result = null;
if (self::is_function_enabled('exec')) {
$exeSniffer = new ExecutableFinder();
// Returns null if nothing is found
$result = $exeSniffer->find($program, null, $paths);
}
$exeSniffer = new ExecutableFinder();
// Returns null if nothing is found
$result = $exeSniffer->find($program, null, $paths);
// store the value for 5 minutes
$memcache->set($program, $result, 300);
return $result;