Use better way to check for the existence of smbclient

This commit is contained in:
Robin Appelman 2015-02-06 14:18:36 +01:00 committed by Thomas Müller
parent d2255a1d30
commit e5731b6e1a

View file

@ -267,12 +267,7 @@ class SMB extends Common {
* check if smbclient is installed * check if smbclient is installed
*/ */
public static function checkDependencies() { public static function checkDependencies() {
if (function_exists('shell_exec')) { $smbClientExists = (bool)\OC_Helper::findBinaryPath('smbclient');
$output = shell_exec('command -v smbclient 2> /dev/null'); return $smbClientExists ? true : array('smbclient');
if (!empty($output)) {
return true;
}
}
return array('smbclient');
} }
} }