Skip to content
Snippets Groups Projects
Commit e5731b6e authored by Robin Appelman's avatar Robin Appelman Committed by Thomas Müller
Browse files

Use better way to check for the existence of smbclient

parent d2255a1d
Branches
No related tags found
No related merge requests found
......@@ -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');
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment