aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-02-06 14:18:36 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-02-16 13:52:11 +0100
commite5731b6e1a74fb4518b351e7770202ab9a297892 (patch)
tree953881fe37cd737f09b3e168e78430b61b159012 /apps
parentd2255a1d304aa5e537e8aa097add2a51aa0e5d89 (diff)
downloadnextcloud-server-e5731b6e1a74fb4518b351e7770202ab9a297892.tar.gz
nextcloud-server-e5731b6e1a74fb4518b351e7770202ab9a297892.zip
Use better way to check for the existence of smbclient
Diffstat (limited to 'apps')
-rw-r--r--apps/files_external/lib/smb.php9
1 files changed, 2 insertions, 7 deletions
diff --git a/apps/files_external/lib/smb.php b/apps/files_external/lib/smb.php
index 571a265e983..34f91defdcc 100644
--- a/apps/files_external/lib/smb.php
+++ b/apps/files_external/lib/smb.php
@@ -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');
}
}