Use better way to check for the existence of smbclient
This commit is contained in:
parent
d2255a1d30
commit
e5731b6e1a
1 changed files with 2 additions and 7 deletions
|
@ -267,12 +267,7 @@ class SMB extends Common {
|
|||
* check if smbclient is installed
|
||||
*/
|
||||
public static function checkDependencies() {
|
||||
if (function_exists('shell_exec')) {
|
||||
$output = shell_exec('command -v smbclient 2> /dev/null');
|
||||
if (!empty($output)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return array('smbclient');
|
||||
$smbClientExists = (bool)\OC_Helper::findBinaryPath('smbclient');
|
||||
return $smbClientExists ? true : array('smbclient');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue