From 15cb8e4efd5c7f74dc5f0336b0e0b5aba5a9d470 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= Date: Tue, 25 Jun 2013 17:46:04 +0200 Subject: [PATCH] only check for external mount points if the external storage app is enabled --- apps/files_encryption/lib/util.php | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php index 00b3192db8..50e823585d 100644 --- a/apps/files_encryption/lib/util.php +++ b/apps/files_encryption/lib/util.php @@ -1027,11 +1027,12 @@ class Util { } // check if it is a group mount - $mount = \OC_Mount_Config::getSystemMountPoints(); - foreach ($mount as $mountPoint => $data) { - if ($mountPoint == substr($ownerPath, 1, strlen($mountPoint))) { - $userIds = array_merge($userIds, - $this->getUserWithAccessToMountPoint($data['applicable']['users'], $data['applicable']['groups'])); + if (\OCP\App::isEnabled("files_external")) { + $mount = \OC_Mount_Config::getSystemMountPoints(); + foreach ($mount as $mountPoint => $data) { + if ($mountPoint == substr($ownerPath, 1, strlen($mountPoint))) { + $userIds = array_merge($userIds, $this->getUserWithAccessToMountPoint($data['applicable']['users'], $data['applicable']['groups'])); + } } } @@ -1567,10 +1568,12 @@ class Util { * @return boolean */ public function isSystemWideMountPoint($path) { - $mount = \OC_Mount_Config::getSystemMountPoints(); - foreach ($mount as $mountPoint => $data) { - if ($mountPoint == substr($path, 1, strlen($mountPoint))) { - return true; + if (\OCP\App::isEnabled("files_external")) { + $mount = \OC_Mount_Config::getSystemMountPoints(); + foreach ($mount as $mountPoint => $data) { + if ($mountPoint == substr($path, 1, strlen($mountPoint))) { + return true; + } } } return false;